From 37567090e99dd6bba6cd0d493a9fdea9b9745d23 Mon Sep 17 00:00:00 2001 From: Mark Tompsett Date: Fri, 25 Aug 2017 07:38:06 -0400 Subject: [PATCH] Bug 18897: Improve error message Test Plan: $ git fetch $ git checkout -b bug_18897 origin/master $ git bz apply 18897 -- interactive apply just the first patch $ sudo apt-get remove libcatmandu-store-elasticsearch-perl ... $ prove t/db_dependent/Koha_Elasticsearch_Indexer.t -- Note that the message says the wrong library is missing. $ git bz apply 18897 -- interactive apply this patch $ prove t/db_dependent/Koha_Elasticsearch_Indexer.t -- Note that the message says the correct library is missing. run the koha qa test tools Signed-off-by: Mark Tompsett Signed-off-by: Lee Jamison Signed-off-by: Tomas Cohen Arazi --- t/db_dependent/Koha_Elasticsearch_Indexer.t | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/t/db_dependent/Koha_Elasticsearch_Indexer.t b/t/db_dependent/Koha_Elasticsearch_Indexer.t index 1cb3a7d..ea65517 100644 --- a/t/db_dependent/Koha_Elasticsearch_Indexer.t +++ b/t/db_dependent/Koha_Elasticsearch_Indexer.t @@ -29,7 +29,11 @@ my $schema = Koha::Database->schema(); eval { require Koha::SearchEngine::Elasticsearch::Indexer; }; if ( $@ ) { - my $es_dep_msg = "Required module Catmandu::Importer::MARC is not installed"; + my $missing_module; + if ( $@ =~ /Can\'t locate (.*?) / ) { + $missing_module = $1; + } + my $es_dep_msg = "Required module $missing_module is not installed"; plan( skip_all => $es_dep_msg ); } else { -- 2.7.4