[Bug 13274] New: t/00-load.t shouldn't depend on the DB
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13274 Bug ID: 13274 Summary: t/00-load.t shouldn't depend on the DB Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Test Suite Assignee: chris@bigballofwax.co.nz Reporter: tomascohen@gmail.com QA Contact: gmcharlt@gmail.com t/00-load.t should mock the DB connection. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13274 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |robin@catalyst.net.nz -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13274 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13274 --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 33632 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=33632&action=edit Bug 13274: t/00-load.t shouldn't depend on the DB To reproduce: - Stop your MySQL server: $ sudo service mysql stop - Run $ prove t/00-load.t => FAIL: some tests fail because of mysql stopped To test (MySQL still stopped) - Apply the patch - Run $ prove t/00-load.t => SUCCESS: tests pass because the ycan be loaded regardless of the absence of the DB server - Sign off :-D Regards -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13274 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |13275 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13274 M. Tompsett <mtompset@hotmail.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=13274 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #33632|0 |1 is obsolete| | --- Comment #2 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 33636 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=33636&action=edit [SIGNED OFF] Bug 13274: t/00-load.t shouldn't depend on the DB To reproduce: - Stop your MySQL server: $ sudo service mysql stop - Run $ prove t/00-load.t => FAIL: some tests fail because of mysql stopped To test (MySQL still stopped) - Apply the patch - Run $ prove t/00-load.t => SUCCESS: tests pass because the ycan be loaded regardless of the absence of the DB server - Sign off :-D NOTE: Even seems to grab more than expected, which is good. 349 tests in master vs 364 in this branch = 16, but removed block is only 13 (lines 20-32). Also ran koha-qa test tool. :) Signed-off-by: Mark Tompsett <mtompset@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13274 Katrin Fischer <katrin.fischer@bsz-bw.de> 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=13274 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #33636|0 |1 is obsolete| | --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 33638 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=33638&action=edit [PASSED QA] Bug 13274: t/00-load.t shouldn't depend on the DB To reproduce: - Stop your MySQL server: $ sudo service mysql stop - Run $ prove t/00-load.t => FAIL: some tests fail because of mysql stopped To test (MySQL still stopped) - Apply the patch - Run $ prove t/00-load.t => SUCCESS: tests pass because the ycan be loaded regardless of the absence of the DB server - Sign off :-D NOTE: Even seems to grab more than expected, which is good. 349 tests in master vs 364 in this branch = 16, but removed block is only 13 (lines 20-32). Also ran koha-qa test tool. :) Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Works as described, tests passing now without database available. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13274 --- Comment #4 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 33645 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=33645&action=edit Bug 13274: Mock new_dbh in t::lib::Mocks This patch suggests to create a routine to mock C4::Context::_new_dbh. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13274 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@biblibre.co | |m --- Comment #5 from Jonathan Druart <jonathan.druart@biblibre.com> --- Please have a look at the last patch. Maybe it would be better to create a routine in t::lib::Mocks to avoid to c/p theses lines in all related bugs. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13274 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #33645|0 |1 is obsolete| | --- Comment #6 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 33649 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=33649&action=edit [SIGNED OFF] Bug 13274: Mock new_dbh in t::lib::Mocks This patch suggests to create a routine to mock C4::Context::_new_dbh. NOTE: Works the same with and without this secondary patch. koha-qa tests fine. Less cutting and pasting in the future. Signed-off-by: Mark Tompsett <mtompset@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13274 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #7 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patches pushed to master. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org