From: Jared Camins-Esakov Date: Fri, 16 Mar 2012 11:38:24 +0000 (-0400) Subject: Bug 7724: Skip Linker test if Zebra isn't set up X-Git-Url: http://git.rot13.org/?a=commitdiff_plain;h=9f7e340f82f8e430389683153ddf300c9a64c2a0;p=koha.git Bug 7724: Skip Linker test if Zebra isn't set up One of the tests in t/db_dependent/Linker_FirstMatch.t ony works if Zebra is running and authorities have been indexed. This was causing Jenkins agitas. The test should be skipped if Zebra isn't running or authorities have not been indexed at the time the test is run. Signed-off-by: Ian Walls Signed-off-by: Paul Poulain --- diff --git a/t/db_dependent/Linker_FirstMatch.t b/t/db_dependent/Linker_FirstMatch.t index a2d3c609c5..66c03ba258 100755 --- a/t/db_dependent/Linker_FirstMatch.t +++ b/t/db_dependent/Linker_FirstMatch.t @@ -39,6 +39,12 @@ SKIP: { my $heading; ok(defined ($heading = C4::Heading->new_from_bib_field($bibfield, '')), "Creating heading from bib field"); + # If Zebra is not running, or authorities have not been indexed, test 3 + # will fail. Skip it if we are unable to retrieve a list of headings from + # Zebra. + my @authids = $heading->authorities(1); + skip "Unable to search Zebra", 1 unless $#authids > 0; + my $authmatch; my $fuzzy; ($authmatch, $fuzzy) = $linker->get_link($heading);