Bugzilla – Attachment 67539 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: Skipping t/db_dependend/00-strict elastic search stuffs as needed
Bug-18897-Skipping-tdbdependend00-strict-elastic-s.patch (text/plain), 2.04 KB, created by
Mark Tompsett
on 2017-10-03 02:10:06 UTC
(
hide
)
Description:
Bug 18897: Skipping t/db_dependend/00-strict elastic search stuffs as needed
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2017-10-03 02:10:06 UTC
Size:
2.04 KB
patch
obsolete
>From 60c8519637b19d4f0e540cff3c01597d712f0ef0 Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Mon, 2 Oct 2017 21:50:01 -0400 >Subject: [PATCH] Bug 18897: Skipping t/db_dependend/00-strict elastic search > stuffs as needed > >Test Plan: >$ git fetch >$ git checkout -b bug_18897 origin/master >$ sudo apt-get remove libcatmandu-store-elasticsearch-perl >$ prove t/db_dependent/00-strict.t >-- nasty failure. >$ git bz apply 18897 >-- interactive apply just the four patchs >$ prove t/db_dependent/00-strict.t >-- nicer skip message >run the koha qa test tools >--- > t/db_dependent/00-strict.t | 21 ++++++++++++++++++++- > 1 file changed, 20 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/00-strict.t b/t/db_dependent/00-strict.t >index 11e9403..cd29260 100644 >--- a/t/db_dependent/00-strict.t >+++ b/t/db_dependent/00-strict.t >@@ -2,6 +2,7 @@ > > use strict; > use warnings; >+use Module::Load::Conditional qw[can_load check_install requires]; > use Test::More; > use Test::Strict; > use File::Spec; >@@ -19,6 +20,24 @@ my @dirs = ( 'acqui', 'admin', 'authorities', 'basket', > 'sms', 'suggestion', 'svc', 'tags', 'tools', 'virtualshelves' ); > > $Test::Strict::TEST_STRICT = 0; >-$Test::Strict::TEST_SKIP = [ 'misc/kohalib.pl', 'sms/sms_listen_windows_start.pl', 'misc/plack/koha.psgi' ]; >+ >+my $general_skips = [ 'misc/kohalib.pl', 'sms/sms_listen_windows_start.pl', 'misc/plack/koha.psgi' ]; >+my $elastic_search_files = [ 'misc/search_tools/rebuild_elastic_search.pl' ]; >+my @skips; >+push @skips,@$general_skips; >+if ( ! can_load( >+ modules => { 'Koha::SearchEngine::Elasticsearch::Indexer' => undef, } ) >+) { >+ my $missing_module; >+ if ( $Module::Load::Conditional::ERROR =~ /Can\'t locate (.*?) / ) { >+ $missing_module = $1; >+ } >+ my $es_dep_msg = "Required module $missing_module is not installed"; >+ diag $es_dep_msg; >+ my $skip_what_msg = "Skipping: " . join ',', @$elastic_search_files; >+ diag $skip_what_msg; >+ push @skips, @$elastic_search_files; >+} >+push @$Test::Strict::TEST_SKIP, @skips; > > all_perl_files_ok(@dirs); >-- >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