[Bug 14878] New: Tests - Create the branchcodes if needed
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14878 Bug ID: 14878 Summary: Tests - Create the branchcodes if needed Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: ASSIGNED Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: jonathan.druart@bugs.koha-community.org Reporter: jonathan.druart@bugs.koha-community.org QA Contact: testopia@bugs.koha-community.org Blocks: 10273 Tests assume that the branchcodes CPL/MPL/etc. already exist in the DB. If they need them, they should create them. Referenced Bugs: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10273 [Bug 10273] Unit tests should not be dependent on the Jenkins database -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14878 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14878 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 42795 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=42795&action=edit Bug 14878: Tests - Create the branchcodes when needed Tests assume that the branchcodes CPL/MPL/etc. already exist in the DB. If they need them, they should create them. Test plan: Execute the differente test files on a DB without any branchcode or at least without CPL/MPL branches. Confirm that the tests pass. Note for QA: - Not to conflict the list rewrite, this patch don't update VirtualShelves* files. - I am not sure about the changes in t/db_dependent/HoldsQueue.t: +is( $holds_queue->[0]->{cardnumber}, $borrower2->{cardnumber}, "Holds queue filling 1st correct hold for default holds policy 'from home library'"); +is( $holds_queue->[1]->{cardnumber}, $borrower1->{cardnumber}, "Holds queue filling 2nd correct hold for default holds policy 'from home library'"); I have swapped borrower1/borrower2 to make the tests pass, but I didn't understand why... -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14878 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14878 Alex Arnaud <alex.arnaud@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |alex.arnaud@biblibre.com --- Comment #2 from Alex Arnaud <alex.arnaud@biblibre.com> --- This patch is quite not esay to test because lot of things remain "db dependent". Jonathan, i did the following (tell me if i'm wrong): - I get the database content provided in bug 10337 (to satisfy all db dependent things), - i created a branchcode 'FOO' on my database and change all borrowers branchcodes with this one, - i deleted all other branches - launch tests on all changed files and get errors on t/db_dependent/Members.t and t/db_dependent/Serials_2.t t/db_dependent/Members.t: Failed test 'Member Changed' (Mismatching member details) t/db_dependent/Serials_2.t: A mysql error -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14878 --- Comment #3 from Tomás Cohen Arazi <tomascohen@gmail.com> --- This one is in conflict with bug 15081, that aims to let the test files handle the transactions on their own. I think the transaction should be started/rolled back when the test writer considers it needs to. An example: if we want each subtest to rollback when it finish, DBIx::Class will complain about nested transactions. And if it doesn't rollback explicitly there would be side effects between tests. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14878 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #42795|0 |1 is obsolete| | --- Comment #4 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 44553 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44553&action=edit Bug 14878: Tests - Create the branchcodes when needed Tests assume that the branchcodes CPL/MPL/etc. already exist in the DB. If they need them, they should create them. Test plan: Execute the differente test files on a DB without any branchcode or at least without CPL/MPL branches. Confirm that the tests pass. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14878 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |15081 --- Comment #5 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Conflicts with bug 15081 fixed. Referenced Bugs: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15081 [Bug 15081] TestBuilder should not handle the transaction -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14878 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #44553|0 |1 is obsolete| | --- Comment #6 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 44597 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44597&action=edit Bug 14878: Tests - Create the branchcodes when needed Tests assume that the branchcodes CPL/MPL/etc. already exist in the DB. If they need them, they should create them. Test plan: Execute the differente test files on a DB without any branchcode or at least without CPL/MPL branches. Confirm that the tests pass. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14878 --- Comment #7 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 44598 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44598&action=edit Bug 14878: (QA followup) Remove useless diag Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14878 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Status|Needs Signoff |Signed Off --- Comment #8 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Nice job Jonathan! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14878 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14878 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #44597|0 |1 is obsolete| | Attachment #44598|0 |1 is obsolete| | --- Comment #9 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 44601 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44601&action=edit [PASSED QA] Bug 14878: Tests - Create the branchcodes when needed Tests assume that the branchcodes CPL/MPL/etc. already exist in the DB. If they need them, they should create them. Test plan: Execute the differente test files on a DB without any branchcode or at least without CPL/MPL branches. Confirm that the tests pass. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14878 --- Comment #10 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 44602 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44602&action=edit [PASSED QA] Bug 14878: (QA followup) Remove useless diag Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14878 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #11 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patches pushed to master. Thanks Jonathan! -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org