@@ -, +, @@ connection - Run $ prove t/db_dependent/Search.t as a valid DB driver. - Apply the patch - Run $ prove r/db_dependent/Search.t - Sign off :-D --- t/db_dependent/Search.t | 5 ----- t/db_dependent/zebra_config.pl | 10 ++++++++++ 2 files changed, 10 insertions(+), 5 deletions(-) --- a/t/db_dependent/Search.t +++ a/t/db_dependent/Search.t @@ -37,8 +37,6 @@ use Test::Warn; use File::Temp qw/ tempdir /; use File::Path; -use t::lib::Mocks; - our $child; our $datadir; @@ -84,9 +82,6 @@ sub cleanup { } } -BEGIN { - t::lib::Mocks::mock_dbh; -} # Fall back to make sure that the Zebra process # and files get cleaned up END { --- a/t/db_dependent/zebra_config.pl +++ a/t/db_dependent/zebra_config.pl @@ -1,12 +1,15 @@ #!/usr/bin/perl use Modern::Perl; + use File::Copy; use File::Path qw(make_path); use File::Find; use File::Basename; use File::Spec; +use C4::Context; + my $source = File::Spec->rel2abs('.'); my $destination = $ARGV[0]; my $marc_type = $ARGV[1] || 'marc21'; @@ -48,6 +51,13 @@ make_path("$destination/var/run/zebradb"); $ENV{'INSTALL_BASE'} = $destination; $ENV{'__INSTALL_BASE__'} = $destination; +$ENV{'__DB_TYPE__'} = C4::Context->config('db_scheme') // 'mysql'; +$ENV{'__DB_NAME__'} = C4::Context->config('database') // 'koha'; +$ENV{'__DB_HOST__'} = C4::Context->config('hostname') // 'localhost'; +$ENV{'__DB_PORT__'} = C4::Context->config('port') // '3306'; +$ENV{'__DB_USER__'} = C4::Context->config('user') // 'kohaadmin'; +$ENV{'__DB_PASS__'} = C4::Context->config('pass') // 'katikoan'; + my @files = ( "$source/etc/koha-conf.xml", "$source/etc/searchengine/queryparser.yaml", ); --