From 5873974199cf8b3e97eca310525228923cd9d074 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Tue, 22 Jun 2021 16:14:16 -0300 Subject: [PATCH] Bug 28572: Set missing __LOG_DIR__ variable in zebra_config.pl This patch makes zebra_config.pl create a temporary directory for logs and sets it in ENV so, when called, rewrite-config.PL sets it correctly. It also adds the new syspref Reference_NFL_Statuses to the big mock to silence many warnings introduced by bug 21260. Signed-off-by: Tomas Cohen Arazi --- t/db_dependent/Search.t | 2 ++ t/db_dependent/zebra_config.pl | 3 +++ 2 files changed, 5 insertions(+) diff --git a/t/db_dependent/Search.t b/t/db_dependent/Search.t index 756174da65..52051375c7 100755 --- a/t/db_dependent/Search.t +++ b/t/db_dependent/Search.t @@ -192,6 +192,8 @@ $contextmodule->mock('preference', sub { return '0'; } elsif ($pref eq 'OPACPlayMusicalInscripts') { return '0'; + } elsif ($pref eq 'Reference_NFL_Statuses') { + return '0'; } else { warn "The syspref $pref was requested but I don't know what to say; this indicates that the test requires updating" unless $pref =~ m/(XSLT|item|branch|holding|image)/i; diff --git a/t/db_dependent/zebra_config.pl b/t/db_dependent/zebra_config.pl index 6137064a85..8f962def23 100755 --- a/t/db_dependent/zebra_config.pl +++ b/t/db_dependent/zebra_config.pl @@ -36,6 +36,7 @@ make_path("$destination/var/lib/zebradb/authorities/key"); make_path("$destination/var/lib/zebradb/authorities/register"); make_path("$destination/var/lib/zebradb/authorities/shadow"); make_path("$destination/var/lib/zebradb/authorities/tmp"); +make_path("$destination/var/log/koha"); make_path("$destination/var/run/zebradb"); $ENV{'INSTALL_BASE'} = $destination; @@ -48,6 +49,8 @@ $ENV{'__DB_PORT__'} = C4::Context->config('port') // '3306'; $ENV{'__DB_USER__'} = C4::Context->config('user') // 'kohaadmin'; $ENV{'__DB_PASS__'} = C4::Context->config('pass') // 'katikoan'; +$ENV{'__LOG_DIR__'} = "$destination/var/log/koha"; + my @files = ( "$source/etc/koha-conf.xml", "$source/etc/log4perl.conf", -- 2.32.0