[Bug 18899] New: Tests should skip instead of failing when dependency modules are not installed
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18899 Bug ID: 18899 Summary: Tests should skip instead of failing when dependency modules are not installed Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Test Suite Assignee: chris@bigballofwax.co.nz Reporter: ldjamison@marywood.edu QA Contact: testopia@bugs.koha-community.org t/db_dependent/00-strict.t (tests 342, 521, 533) and t/db_dependent/Koha_SearchEngine_Elasticsearch_Search.t (test 1) fail instead of skipping when a Perl module required for them to run properly is not installed. test 342 requires Catmandu::Importer::MARC tests 521 and 533 require WebService::ILS::OverDrive::Patron test 1 requires Catmandu::Store::ElasticSearch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18899 Lee Jamison <ldjamison@marywood.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=18897 Assignee|chris@bigballofwax.co.nz |ldjamison@marywood.edu -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18899 Lee Jamison <ldjamison@marywood.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18899 Lee Jamison <ldjamison@marywood.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18899 --- Comment #1 from Lee Jamison <ldjamison@marywood.edu> --- Created attachment 64858 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64858&action=edit Bug 18899 - Tests should skip instead of failing when dependency modules are not installed Test Plan 1. Run 'prove -v t/db_dependent/00-strict.t' on a fresh Koha box. 2. Notice the failures listed caused by the missing modules in the Bug Description and number of tests ran. 3. Apply patch. 4. Re-run 'prove -v t/db_dependent/00-strict.t'. 5. Notice all tests pass and there are 1-3 less tests ran (skipped) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18899 --- Comment #2 from M. Tompsett <mtompset@hotmail.com> --- Comment on attachment 64858 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64858 Bug 18899 - Tests should skip instead of failing when dependency modules are not installed Review of attachment 64858: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=18899&attachment=64858) ----------------------------------------------------------------- You write: test 342 requires Catmandu::Importer::MARC tests 521 and 533 require WebService::ILS::OverDrive::Patron test 1 requires Catmandu::Store::ElasticSearch But then your code has no explicit mention of them. I think this needs some logic clean up, sorry. Even comments explaining the relationship between the requires done and why they are failing (the ones above) would be an improvement. ::: t/db_dependent/00-strict.t @@ +31,5 @@
+if ( $@ ) { + push @skips, 'opac/svc/overdrive'; +} + +eval { require Koha::ExternalContent::OverDrive; };
This is identical to line 29. Why didn't you place line 38 as line 33? That is do both pushes in the single $@. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18899 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtompset@hotmail.com Status|Needs Signoff |Failed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18899 --- Comment #3 from M. Tompsett <mtompset@hotmail.com> --- Interesting... I came across the same problem a while back, and hadn't gotten to documenting fixing it File: test_on_fresh_install_failures.txt "Catmandu/Importer/MARC.pm WebService/ILS/OverDrive/Patron.pm Catmandu/Store/ElasticSearch.pm" -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18899 Lee Jamison <ldjamison@marywood.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Failed QA |RESOLVED --- Comment #4 from Lee Jamison <ldjamison@marywood.edu> --- As of the time of this comment the tests no longer fail but instead skip if modules are not installed. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org