Bug 18897: Add skipping to t/db_dependent/Koha_SearchEngine_Elasticsearch_Search.t
Test Plan: $ git fetch $ git checkout -b bug_18897 origin/master $ sudo apt-get remove libcatmandu-store-elasticsearch-perl $ prove t/db_dependent/Koha_SearchEngine_Elasticsearch_Search.t -- nasty failure. $ git bz apply 18897 -- apply all the patches $ prove t/db_dependent/Koha_SearchEngine_Elasticsearch_Search.t -- nicer skip message run the koha qa test tools Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
parent
faf651e514
commit
2b4d0cb0b4
|
|
@ -17,9 +17,24 @@
|
|||
|
||||
use Modern::Perl;
|
||||
|
||||
use Test::More tests => 12;
|
||||
use Module::Load::Conditional qw[can_load check_install requires];
|
||||
use Test::More;
|
||||
use t::lib::Mocks;
|
||||
|
||||
if ( ! can_load(
|
||||
modules => { 'Koha::SearchEngine::Elasticsearch::Indexer' => undef, } )
|
||||
) {
|
||||
my $missing_module;
|
||||
if ( $Module::Load::Conditional::ERROR =~ /Can\'t locate (.*?) / ) {
|
||||
$missing_module = $1;
|
||||
}
|
||||
my $es_dep_msg = "Required module $missing_module is not installed";
|
||||
plan( skip_all => $es_dep_msg );
|
||||
}
|
||||
else {
|
||||
plan tests => 12;
|
||||
}
|
||||
|
||||
use Koha::SearchEngine::Elasticsearch::QueryBuilder;
|
||||
|
||||
my $builder = Koha::SearchEngine::Elasticsearch::QueryBuilder->new( { index => 'mydb' } );
|
||||
|
|
|
|||
Loading…
Reference in New Issue