]> git.koha-community.org Git - koha.git/commit
Bug 19542: Add a check for ES configuration health
authorTomas Cohen Arazi <tomascohen@theke.io>
Tue, 31 Oct 2017 14:26:36 +0000 (11:26 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 11 Dec 2017 17:30:42 +0000 (14:30 -0300)
commitf57c3b36ea55612d81da7eaa8f75efe9126f9703
tree137ffc4c9d724c798f19c447cc43320bfb59815d
parent0ab5a3cf929505a393060f212a4a0399abd9245d
Bug 19542: Add a check for ES configuration health

This patch adds a new statuc function to Koha::SearchEngine::ElasticSearch
which is instended to replace most of get_elasticsearch_params. This function
reads the configuration from C4::Context->config('elasticsearch') and raises
relevant exceptions when mandatory entries are missing.

Its behaviour is covered by tests.

To test:
- Run:
  $ kshell
 k$ prove t/Koha/SearchEngine/Elasticsearch.t
=> SUCCESS: Tests pass!
- Sign off :-D

Signed-off-by: David Bourgault <david.bourgault@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Koha/Exceptions/Config.pm [new file with mode: 0644]
Koha/SearchEngine/Elasticsearch.pm
t/Koha/SearchEngine/Elasticsearch.t [new file with mode: 0644]