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

(-)a/t/Koha/SearchEngine/Elasticsearch.t (-2 / +11 lines)
Lines 33-39 use Koha::SearchEngine::Elasticsearch::Search; Link Here
33
33
34
subtest '_read_configuration() tests' => sub {
34
subtest '_read_configuration() tests' => sub {
35
35
36
    plan tests => 10;
36
    plan tests => 13;
37
37
38
    my $configuration;
38
    my $configuration;
39
    t::lib::Mocks::mock_config( 'elasticsearch', undef );
39
    t::lib::Mocks::mock_config( 'elasticsearch', undef );
Lines 89-95 subtest '_read_configuration() tests' => sub { Link Here
89
89
90
    $configuration = Koha::SearchEngine::Elasticsearch::_read_configuration;
90
    $configuration = Koha::SearchEngine::Elasticsearch::_read_configuration;
91
    is( $configuration->{index_name}, 'index', 'Index configuration parsed correctly' );
91
    is( $configuration->{index_name}, 'index', 'Index configuration parsed correctly' );
92
    is( $configuration->{cxn_pool}, 'Static', 'cxn_pool configuration set correctly to Static if not specified' );
92
    is_deeply( $configuration->{nodes}, \@servers , 'Server configuration parsed correctly' );
93
    is_deeply( $configuration->{nodes}, \@servers , 'Server configuration parsed correctly' );
94
95
    t::lib::Mocks::mock_config( 'elasticsearch', { server => \@servers, index_name => 'index', cxn_pool => 'Fluid' } );
96
97
    $configuration = Koha::SearchEngine::Elasticsearch::_read_configuration;
98
    is( $configuration->{cxn_pool}, 'Fluid', 'cxn_pool configuration parsed correctly' );
99
100
    my $params = Koha::SearchEngine::Elasticsearch::get_elasticsearch_params;
101
    is_deeply( $configuration->{nodes}, \@servers , 'get_elasticsearch_params is just a wrapper for _read_configuration' );
102
93
};
103
};
94
104
95
subtest 'get_elasticsearch_settings() tests' => sub {
105
subtest 'get_elasticsearch_settings() tests' => sub {
96
- 

Return to bug 26309