[Koha-bugs] [Bug 18445] New: Tests in t stumble over Auth's BEGIN block
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Tue Apr 18 14:51:26 CEST 2017
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18445
Bug ID: 18445
Summary: Tests in t stumble over Auth's BEGIN block
Change sponsored?: ---
Product: Koha
Version: master
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P5 - low
Component: Test Suite
Assignee: chris at bigballofwax.co.nz
Reporter: m.de.rooy at rijksmuseum.nl
QA Contact: gmcharlt at gmail.com
We should be able to run the tests in t without the database.
But if some module loads Auth.pm via C4/Serials or Koha/Virtualshelf directly
or indirectly, this will trigger execution of Auth's BEGIN block. This block
contains three calls for systempreferences (one from Auth_with_cas). Note that
loading Biblio.pm also starts a chain going to Auth.pm.
This report changes two use C4::Auth statements into requires. This will
prevent or postpone execution of this code. Note also that this will resolve a
few failing tests like (Matcher.t and Prices.t) where the schema mock actually
was too late and the database was accessed instead of defined fixtures.
Along the way we fix a few minor issues in t where database access should be
eliminated.
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list