[Bug 13276] New: t/XSLT.t shouldn't depend on the DB
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13276 Bug ID: 13276 Summary: t/XSLT.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/XSLT.t should mock the DB -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13276 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=13276 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=13276 --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 33633 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=33633&action=edit Bug 13276: t/XSLT.t shouldn't depend on the DB To reproduce: - Stop your MySQL server: $ sudo service mysql stop - Run $ prove t/XSLT.t => FAIL: some tests fail because of mysql stopped To test (MySQL still stopped) - Apply the patch - Run $ prove t/XSLT.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=13276 Magnus Enger <magnus@enger.priv.no> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA CC| |magnus@enger.priv.no --- Comment #2 from Magnus Enger <magnus@enger.priv.no> --- *Before* applying the patch: $ sudo koha-shell -c "prove t/XSLT.t" kohadev t/XSLT.t .. ok All tests successful. Files=1, Tests=8, 2 wallclock secs ( 0.02 usr 0.01 sys + 0.48 cusr 0.45 csys = 0.96 CPU) Result: PASS As far as I can tell, the patch adds mocking of C4::Context but never uses that for anything? Perhaps I am missing something but I'm setting this to Failed QA. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13276 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff --- Comment #3 from Chris Cormack <chris@bigballofwax.co.nz> --- Before patch I get # Failed test 'use C4::XSLT;' # at t/XSLT.t line 14. # Tried to use 'C4::XSLT'. # Error: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) at C4/Context.pm line 785. After the patch it works -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13276 Chris Cormack <chris@bigballofwax.co.nz> 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=13276 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #33633|0 |1 is obsolete| | --- Comment #4 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 33639 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=33639&action=edit Bug 13276: t/XSLT.t shouldn't depend on the DB To reproduce: - Stop your MySQL server: $ sudo service mysql stop - Run $ prove t/XSLT.t => FAIL: some tests fail because of mysql stopped To test (MySQL still stopped) - Apply the patch - Run $ prove t/XSLT.t => SUCCESS: tests pass because the ycan be loaded regardless of the absence of the DB server - Sign off :-D Regards Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13276 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=13276 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #33639|0 |1 is obsolete| | --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 33640 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=33640&action=edit [PASSED QA] Bug 13276: t/XSLT.t shouldn't depend on the DB To reproduce: - Stop your MySQL server: $ sudo service mysql stop - Run $ prove t/XSLT.t => FAIL: some tests fail because of mysql stopped To test (MySQL still stopped) - Apply the patch - Run $ prove t/XSLT.t => SUCCESS: tests pass because the ycan be loaded regardless of the absence of the DB server - Sign off :-D Regards Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Tests pass without db connection for me now. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13276 --- Comment #6 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 33646 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=33646&action=edit Bug 13276: use t::lib::Mocks::mock_dbh To use this patch, patch from bug 13274 should be applied too. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13276 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@biblibre.co | |m --- Comment #7 from Jonathan Druart <jonathan.druart@biblibre.com> --- The last patch reintroduces the use_ok into the BEGIN block and use the mock subroutine introduced by the patch on bug 13274 comment 4. Feel free not to use/push it. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13276 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #8 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