https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18445

--- Comment #1 from Marcel de Rooy <[email protected]> ---
Created attachment 62290
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62290&action=edit
Bug 18445: Replace two use C4::Auth statements

Both Serials.pm and Virtualshelf.pm only need haspermission in a specific
sub. Since loading the module at compile-time triggers early execution of
the BEGIN block, this results in database access in the tests that are
assumed to be database independent.

At the same time we are resolving test failures in Matcher.t and Prices.t
because the schema mock is too late.

Test plan:
[1] Do not yet apply this patch. Backup your database.
[2] Drop the database and create a new empty one.
[3] Run the tests in t. Look at Matcher.t and Prices.t too.
    You will see quite some occurrences of:
    DBD::mysql::st execute failed: Table 'koha_master.systempreferences'
doesn't exist [for Statement "SELECT `me`.`variable`, `me`.`value`,
`me`.`options`, `me`.`explanation`, `me`.`type` FROM `systempreferences` `me`
WHERE ( `me`.`variable` = ? )" with ParamValues: 0='casauthentication'] at
/usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1832.

[4] Apply this patch.
[5] Run the tests in t again. Check the results of Matcher.t and Prices.t.
[6] Restore your database.
[7] Run t/db_dependent/Serials_2.t to trigger the change in Serials.
[8] Run t/db_dependent/Virtualshelves.t to test Koha/Virtualshelf.

Signed-off-by: Marcel de Rooy <[email protected]>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to