Lines 37-43
$schema->storage->txn_begin;
Link Here
|
37 |
|
37 |
|
38 |
subtest '_read_configuration() tests' => sub { |
38 |
subtest '_read_configuration() tests' => sub { |
39 |
|
39 |
|
40 |
plan tests => 13; |
40 |
plan tests => 15; |
41 |
|
41 |
|
42 |
my $configuration; |
42 |
my $configuration; |
43 |
t::lib::Mocks::mock_config( 'elasticsearch', undef ); |
43 |
t::lib::Mocks::mock_config( 'elasticsearch', undef ); |
Lines 100-109
subtest '_read_configuration() tests' => sub {
Link Here
|
100 |
|
100 |
|
101 |
$configuration = Koha::SearchEngine::Elasticsearch::_read_configuration; |
101 |
$configuration = Koha::SearchEngine::Elasticsearch::_read_configuration; |
102 |
is( $configuration->{cxn_pool}, 'Fluid', 'cxn_pool configuration parsed correctly' ); |
102 |
is( $configuration->{cxn_pool}, 'Fluid', 'cxn_pool configuration parsed correctly' ); |
|
|
103 |
isnt( defined $configuration->{trace_to}, 'trace_to is not defined if not set' ); |
103 |
|
104 |
|
104 |
my $params = Koha::SearchEngine::Elasticsearch::get_elasticsearch_params; |
105 |
my $params = Koha::SearchEngine::Elasticsearch::get_elasticsearch_params; |
105 |
is_deeply( $configuration->{nodes}, \@servers , 'get_elasticsearch_params is just a wrapper for _read_configuration' ); |
106 |
is_deeply( $configuration->{nodes}, \@servers , 'get_elasticsearch_params is just a wrapper for _read_configuration' ); |
106 |
|
107 |
|
|
|
108 |
t::lib::Mocks::mock_config( 'elasticsearch', { server => \@servers, index_name => 'index', cxn_pool => 'Fluid', trace_to => 'Stderr' } ); |
109 |
|
110 |
$configuration = Koha::SearchEngine::Elasticsearch::_read_configuration; |
111 |
is( $configuration->{trace_to}, 'Stderr', 'trace_to configuration parsed correctly' ); |
107 |
}; |
112 |
}; |
108 |
|
113 |
|
109 |
subtest 'get_elasticsearch_settings() tests' => sub { |
114 |
subtest 'get_elasticsearch_settings() tests' => sub { |
110 |
- |
|
|