View | Details | Raw Unified | Return to bug 18897
Collapse All | Expand All

(-)a/t/db_dependent/Koha_Elasticsearch_Indexer.t (-4 / +5 lines)
Lines 17-22 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Module::Load::Conditional qw[can_load check_install requires];
20
use Test::More;
21
use Test::More;
21
use Test::MockModule;
22
use Test::MockModule;
22
use t::lib::Mocks;
23
use t::lib::Mocks;
Lines 27-36 use Koha::Database; Link Here
27
28
28
my $schema = Koha::Database->schema();
29
my $schema = Koha::Database->schema();
29
30
30
eval { require Koha::SearchEngine::Elasticsearch::Indexer; };
31
if ( ! can_load(
31
if ( $@ ) {
32
    modules => { 'Koha::SearchEngine::Elasticsearch::Indexer' => undef, } )
33
) {
32
    my $missing_module;
34
    my $missing_module;
33
    if ( $@ =~ /Can\'t locate (.*?) / ) {
35
    if ( $Module::Load::Conditional::ERROR =~ /Can\'t locate (.*?) / ) {
34
        $missing_module = $1;
36
        $missing_module = $1;
35
    }
37
    }
36
    my $es_dep_msg = "Required module $missing_module is not installed";
38
    my $es_dep_msg = "Required module $missing_module is not installed";
37
- 

Return to bug 18897