Bugzilla – Attachment 64818 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 not installed
Bug-18897---KohaElasticsearchIndexert-doesnt-skip-.patch (text/plain), 1.42 KB, created by
Lee Jamison
on 2017-07-05 18:08:01 UTC
(
hide
)
Description:
Bug 18897 - Koha_Elasticsearch_Indexer.t doesn't skip when ES module not installed
Filename:
MIME Type:
Creator:
Lee Jamison
Created:
2017-07-05 18:08:01 UTC
Size:
1.42 KB
patch
obsolete
>From 27243e4bedcef3c5a319a1cd6bd376426c44f98a Mon Sep 17 00:00:00 2001 >From: Lee Jamison <ldjamison@marywood.edu> >Date: Wed, 5 Jul 2017 18:01:57 +0000 >Subject: [PATCH] Bug 18897 - Koha_Elasticsearch_Indexer.t doesn't skip when ES > module not installed > >If Catmandu::Importer::MARC is not installed, >Koha_Elasticsearch_Indexer.t fails instead of skipping. > >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. >--- > t/db_dependent/Koha_Elasticsearch_Indexer.t | 13 +++++++++++-- > 1 file changed, 11 insertions(+), 2 deletions(-) > >diff --git a/t/db_dependent/Koha_Elasticsearch_Indexer.t b/t/db_dependent/Koha_Elasticsearch_Indexer.t >index 04a8e2a..dfe7777 100644 >--- a/t/db_dependent/Koha_Elasticsearch_Indexer.t >+++ b/t/db_dependent/Koha_Elasticsearch_Indexer.t >@@ -17,11 +17,20 @@ > > use Modern::Perl; > >-use Test::More tests => 5; >+use Test::More; > > use MARC::Record; > >-use_ok('Koha::SearchEngine::Elasticsearch::Indexer'); >+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 => 5; >+ use_ok('Koha::SearchEngine::Elasticsearch::Indexer'); >+} > > my $indexer; > ok( >-- >2.1.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