|
Lines 39-45
$schema->storage->txn_begin;
Link Here
|
| 39 |
|
39 |
|
| 40 |
subtest '_read_configuration() tests' => sub { |
40 |
subtest '_read_configuration() tests' => sub { |
| 41 |
|
41 |
|
| 42 |
plan tests => 15; |
42 |
plan tests => 16; |
| 43 |
|
43 |
|
| 44 |
my $configuration; |
44 |
my $configuration; |
| 45 |
t::lib::Mocks::mock_config( 'elasticsearch', undef ); |
45 |
t::lib::Mocks::mock_config( 'elasticsearch', undef ); |
|
Lines 107-116
subtest '_read_configuration() tests' => sub {
Link Here
|
| 107 |
my $params = Koha::SearchEngine::Elasticsearch::get_elasticsearch_params; |
107 |
my $params = Koha::SearchEngine::Elasticsearch::get_elasticsearch_params; |
| 108 |
is_deeply( $configuration->{nodes}, \@servers , 'get_elasticsearch_params is just a wrapper for _read_configuration' ); |
108 |
is_deeply( $configuration->{nodes}, \@servers , 'get_elasticsearch_params is just a wrapper for _read_configuration' ); |
| 109 |
|
109 |
|
| 110 |
t::lib::Mocks::mock_config( 'elasticsearch', { server => \@servers, index_name => 'index', cxn_pool => 'Sniff', trace_to => 'Stderr' } ); |
110 |
t::lib::Mocks::mock_config( 'elasticsearch', { server => \@servers, index_name => 'index', cxn_pool => 'Sniff', trace_to => 'Stderr', request_timeout => 42 } ); |
| 111 |
|
111 |
|
| 112 |
$configuration = Koha::SearchEngine::Elasticsearch::_read_configuration; |
112 |
$configuration = Koha::SearchEngine::Elasticsearch::_read_configuration; |
| 113 |
is( $configuration->{trace_to}, 'Stderr', 'trace_to configuration parsed correctly' ); |
113 |
is( $configuration->{trace_to}, 'Stderr', 'trace_to configuration parsed correctly' ); |
|
|
114 |
is( $configuration->{request_timeout}, '42', 'additional configuration (request_timeout) parsed correctly' ); |
| 114 |
}; |
115 |
}; |
| 115 |
|
116 |
|
| 116 |
subtest 'get_elasticsearch_settings() tests' => sub { |
117 |
subtest 'get_elasticsearch_settings() tests' => sub { |
| 117 |
- |
|
|