Bugzilla – Attachment 109578 Details for
Bug 26309
Elasticsearch cxn_pool must be configurable (again)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26309: Unit tests
Bug-26309-Unit-tests.patch (text/plain), 1.85 KB, created by
Fridolin Somers
on 2020-09-03 07:33:22 UTC
(
hide
)
Description:
Bug 26309: Unit tests
Filename:
MIME Type:
Creator:
Fridolin Somers
Created:
2020-09-03 07:33:22 UTC
Size:
1.85 KB
patch
obsolete
>From 678058ee77d585a35b687047b28dfecc7004a866 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 27 Aug 2020 15:03:07 +0000 >Subject: [PATCH] Bug 26309: Unit tests > >Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> >--- > t/db_dependent/Koha/SearchEngine/Elasticsearch.t | 12 +++++++++++- > 1 file changed, 11 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Koha/SearchEngine/Elasticsearch.t b/t/db_dependent/Koha/SearchEngine/Elasticsearch.t >index 471baf34e1..12c3599885 100644 >--- a/t/db_dependent/Koha/SearchEngine/Elasticsearch.t >+++ b/t/db_dependent/Koha/SearchEngine/Elasticsearch.t >@@ -37,7 +37,7 @@ $schema->storage->txn_begin; > > subtest '_read_configuration() tests' => sub { > >- plan tests => 10; >+ plan tests => 13; > > my $configuration; > t::lib::Mocks::mock_config( 'elasticsearch', undef ); >@@ -93,7 +93,17 @@ subtest '_read_configuration() tests' => sub { > > $configuration = Koha::SearchEngine::Elasticsearch::_read_configuration; > is( $configuration->{index_name}, 'index', 'Index configuration parsed correctly' ); >+ is( $configuration->{cxn_pool}, 'Static', 'cxn_pool configuration set correctly to Static if not specified' ); > is_deeply( $configuration->{nodes}, \@servers , 'Server configuration parsed correctly' ); >+ >+ t::lib::Mocks::mock_config( 'elasticsearch', { server => \@servers, index_name => 'index', cxn_pool => 'Fluid' } ); >+ >+ $configuration = Koha::SearchEngine::Elasticsearch::_read_configuration; >+ is( $configuration->{cxn_pool}, 'Fluid', 'cxn_pool configuration parsed correctly' ); >+ >+ my $params = Koha::SearchEngine::Elasticsearch::get_elasticsearch_params; >+ is_deeply( $configuration->{nodes}, \@servers , 'get_elasticsearch_params is just a wrapper for _read_configuration' ); >+ > }; > > subtest 'get_elasticsearch_settings() tests' => sub { >-- >2.27.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 26309
:
109237
|
109238
|
109578
|
109579
|
109589
|
109590