[Bug 15151] New: t/Circulation_barcodedecode.t fails if no DB present
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15151 Bug ID: 15151 Summary: t/Circulation_barcodedecode.t fails if no DB present Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: blocker Priority: P5 - low Component: Test Suite Assignee: chris@bigballofwax.co.nz Reporter: tomascohen@gmail.com QA Contact: gmcharlt@gmail.com It should be mocking the DB, but... To reproduce: - Run the test: $ prove t/Circulation_barcodedecode.t => SUCCESS: Tests pass - Shut mysql down $ sudo service mysql stop - Run the test: $ prove t/Circulation_barcodedecode.t => FAIL: Tests fail due to missing DB connection -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15151 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org, | |katrin.fischer@bsz-bw.de, | |kyle.m.hall@gmail.com, | |m.de.rooy@rijksmuseum.nl -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15151 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15151 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 44568 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44568&action=edit Bug 15151: Make t/Circulation_barcodedecode.t pass Test plan: prove t/Circulation_barcodedecode.t should return green even if your DBMS is stopped. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15151 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #44568|0 |1 is obsolete| | --- Comment #2 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 44569 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44569&action=edit Bug 15151 [Alternate] - t/Circulation_barcodedecode.t fails if no DB present Test Plan: 1) Shut down database 2) prove t/Circulation_barcodedecode.t should fail 3) Apply this patch 4) prove t/Circulation_barcodedecode.t should not fail! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15151 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com Attachment #44568|1 |0 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15151 --- Comment #3 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 44570 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44570&action=edit Bug 15151: (counter patch) Avoid DB access to load C4::Members In order to avoid loading Koha::NorwegianPatronDB a DB query was used. Instead, a require should be used. This causes non-db_dependent tests that load C4::Members to fail. To test: - Shut mysql down $ sudo service mysql stop - Run the tests: prove t/Circulation_barcodedecode.t => FAIL: DB connection is expected, tests fail - Apply the patch - Run the tests: prove t/Circulation_barcodedecode.t => SUCCESS: Tests pass - Sign off .-D -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15151 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #44569|0 |1 is obsolete| | --- Comment #4 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 44571 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44571&action=edit Bug 15151 [Alternate] - t/Circulation_barcodedecode.t fails if no DB present Test Plan: 1) Shut down database 2) prove t/Circulation_barcodedecode.t should fail 3) Apply this patch 4) prove t/Circulation_barcodedecode.t should not fail! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15151 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |14778 Referenced Bugs: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14778 [Bug 14778] DBIC should create/own the DB handler -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15151 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15151 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #44568|0 |1 is obsolete| | Attachment #44571|0 |1 is obsolete| | --- Comment #5 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 44573 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44573&action=edit [SIGNED-OFF] Bug 15151: (counter patch) Avoid DB access to load C4::Members In order to avoid loading Koha::NorwegianPatronDB a DB query was used. Instead, a require should be used. This causes non-db_dependent tests that load C4::Members to fail. To test: - Shut mysql down $ sudo service mysql stop - Run the tests: prove t/Circulation_barcodedecode.t => FAIL: DB connection is expected, tests fail - Apply the patch - Run the tests: prove t/Circulation_barcodedecode.t => SUCCESS: Tests pass - Sign off .-D 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=15151 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #44570|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15151 --- Comment #6 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 44604 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44604&action=edit Bug 15151: (counter patch) Avoid DB access to load C4::Members In order to avoid loading Koha::NorwegianPatronDB a DB query was used. Instead, a require should be used. This causes non-db_dependent tests that load C4::Members to fail. To test: - Shut mysql down $ sudo service mysql stop - Run the tests: prove t/Circulation_barcodedecode.t => FAIL: DB connection is expected, tests fail - Apply the patch - Run the tests: prove t/Circulation_barcodedecode.t => SUCCESS: Tests pass - Sign off .-D Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15151 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com Attachment #44573|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15151 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #44604|Bug 15151: (counter patch) |[PASSED QA] Bug 15151: description|Avoid DB access to load |(counter patch) Avoid DB |C4::Members |access to load C4::Members -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15151 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #7 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Passed all tests, code looks good.. go for it ;) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15151 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |tomascohen@gmail.com --- Comment #8 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patch pushed to master. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15151 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |13275 Referenced Bugs: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13275 [Bug 13275] (OMNIBUS) Tests on t/ should pass without a DB -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15151 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |15182 Referenced Bugs: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15182 [Bug 15182] make test fails immediately on 3.22.00-beta due to missing Crypt::GCrypt which is optional -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15151 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |frederic@tamil.fr --- Comment #9 from Frédéric Demians <frederic@tamil.fr> --- This patch has been pushed to 3.20.x, will be in 3.20.6. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15151 Liz Rea <liz@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |liz@catalyst.net.nz Status|Pushed to Master |Pushed to Stable --- Comment #10 from Liz Rea <liz@catalyst.net.nz> --- Pushed to 3.18.13, and released. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org