[Koha-bugs] [Bug 33718] _new_Zconn crashes on a bug in t::lib::Mocks::mock_config
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Thu May 11 23:16:42 CEST 2023
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33718
David Nind <david at davidnind.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #151075|0 |1
is obsolete| |
--- Comment #7 from David Nind <david at davidnind.com> ---
Created attachment 151101
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=151101&action=edit
Bug 33718: Fix the mock of Koha::Config->get in mock_config
It should not mock calls for other sections than 'config' in
koha-conf.xml.
Test plan:
Without this patch:
[1] Enable CatalogModuleRelink and LinkerRelink. This will trigger
a SearchAuthorities call when creating a sample biblio.
Note: SearchAuthorities calls Zconn and gets back information from
a wrong part of koha-conf.xml.
[2] Run t/db_dependent/Koha/Pseudonymization.t
You should see something like:
{UNKNOWN}: Can't use string ("authorities") as a HASH ref while "strict refs"
in use at /usr/share/koha/C4/Context.pm line 587. at
/usr/share/koha/C4/Biblio.pm line 302
With this patch:
[3] Run t/db_dependent/Koha/Pseudonymization.t. Should pass now.
[4] git grep -l mock_config | xargs -i{} prove {}
Exclude Mocks.pm.
Signed-off-by: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>
Signed-off-by: David Nind <david at davidnind.com>
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list