Bug 16561 - Regression caused by 15877 - t/db_dependent/Barcodes.t deletes all items from a DB
Summary: Regression caused by 15877 - t/db_dependent/Barcodes.t deletes all items from...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: master
Hardware: All All
: P5 - low blocker (vote)
Assignee: Nick Clemens
QA Contact: Galen Charlton
URL:
Keywords:
Depends on: 15877
Blocks: 15878
  Show dependency treegraph
 
Reported: 2016-05-22 00:13 UTC by Nick Clemens
Modified: 2019-06-27 09:24 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 16561 - Followup to fix tests (1.70 KB, patch)
2016-05-22 00:14 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 16561 - Bug 15877 followup to fix tests (1.86 KB, patch)
2016-05-22 07:17 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens 2016-05-22 00:13:44 UTC
When attempting to avoid accidental deletion of items in Barcodes.t, I instead caused total deletion of items and issues
Comment 1 Nick Clemens 2016-05-22 00:14:35 UTC Comment hidden (obsolete)
Comment 2 Jonathan Druart 2016-05-22 07:17:08 UTC
Created attachment 51693 [details] [review]
Bug 16561 - Bug 15877 followup to fix tests

When I altered the tests to avoid accidental deletion of all items, I
didn't rollback the transaction, hence the tests now delete all items
from a db when run.

This patch rollsback the transaction so items are not deleted from your db

To test:
1 - Backup your db
2 - prove -v t/db_dependent/Barcodes.t
3 - Note that all items and issues are deleted from the DB
4 - Restore your DB
5 - Apply this patch
6 - prove -v t/db_dependent/Barcodes.t
7 - Your DB should eb unchanged

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 3 Jonathan Druart 2016-05-22 07:18:10 UTC
I have amended the patch to fix alignment and commit message (to display bug 15877).

Skipping QA as it's a trivial one.
Comment 4 Kyle M Hall 2016-05-23 16:55:01 UTC
Pushed to master for Koha 16.05, thanks Nick!
Comment 5 Julian Maurice 2016-05-25 08:35:38 UTC
Patch pushed to 3.22.x, will be in 3.22.7