Bugzilla – Attachment 67521 Details for
Bug 18897
Elastic related tests do not skip when ES modules are not installed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18897: Koha_Elasticsearch_Indexer.t doesn't skip when ES module(s) not installed
Bug-18897-KohaElasticsearchIndexert-doesnt-skip-wh.patch (text/plain), 1.66 KB, created by
Tomás Cohen Arazi (tcohen)
on 2017-10-02 14:56:08 UTC
(
hide
)
Description:
Bug 18897: Koha_Elasticsearch_Indexer.t doesn't skip when ES module(s) not installed
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2017-10-02 14:56:08 UTC
Size:
1.66 KB
patch
obsolete
>From ea9db162e1fa0d4a53a040215858f501a654bab0 Mon Sep 17 00:00:00 2001 >From: Lee Jamison <ldjamison@marywood.edu> >Date: Fri, 25 Aug 2017 07:18:15 -0400 >Subject: [PATCH] Bug 18897: Koha_Elasticsearch_Indexer.t doesn't skip when ES > module(s) not installed > >If Catmandu::Importer::MARC is not installed, >Koha_Elasticsearch_Indexer.t fails instead of skipping. >It should skip as ES is not currently mandatory. > >Test Plan: >1. Run "prove t/db_dependent/Koha_Elasticsearch_Indexer.t" > as koha-shell >2. Note failure on test 1/5 indicating module not installed. >3. Apply patch. >4. Re-run "prove t/db_dependent/Koha_Elasticsearch_Indexer.t" >5. Note test now skips. > >Signed-off-by: Mark Tompsett <mtompset@hotmail.com> > >Signed-off-by: Lee Jamison <ldjamison@marywood.edu> >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > t/db_dependent/Koha_Elasticsearch_Indexer.t | 11 ++++++++++- > 1 file changed, 10 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Koha_Elasticsearch_Indexer.t b/t/db_dependent/Koha_Elasticsearch_Indexer.t >index 9a525bf..1cb3a7d 100644 >--- a/t/db_dependent/Koha_Elasticsearch_Indexer.t >+++ b/t/db_dependent/Koha_Elasticsearch_Indexer.t >@@ -17,7 +17,7 @@ > > use Modern::Perl; > >-use Test::More tests => 6; >+use Test::More; > use Test::MockModule; > use t::lib::Mocks; > >@@ -27,6 +27,15 @@ use Koha::Database; > > my $schema = Koha::Database->schema(); > >+eval { require Koha::SearchEngine::Elasticsearch::Indexer; }; >+if ( $@ ) { >+ my $es_dep_msg = "Required module Catmandu::Importer::MARC is not installed"; >+ plan( skip_all => $es_dep_msg ); >+} >+else { >+ plan tests => 6; >+} >+ > use_ok('Koha::SearchEngine::Elasticsearch::Indexer'); > > my $indexer; >-- >2.7.4
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 18897
:
64818
|
66478
|
66479
|
66568
|
66569
|
66777
|
66779
|
67521
|
67522
|
67523
|
67539
|
67540
|
67553
|
67554
|
67555
|
67556
|
67557