Bugzilla – Attachment 50212 Details for
Bug 12478
Elasticsearch support for Koha
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12478 : Fixing the tests for Koha::SearchEngine::Elasticsearch::Search
Bug-12478--Fixing-the-tests-for-KohaSearchEngineEl.patch (text/plain), 2.09 KB, created by
Chris Cormack
on 2016-04-13 21:22:35 UTC
(
hide
)
Description:
Bug 12478 : Fixing the tests for Koha::SearchEngine::Elasticsearch::Search
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2016-04-13 21:22:35 UTC
Size:
2.09 KB
patch
obsolete
>From a6afe29fc610f67624898a2e1499e9c9038468f0 Mon Sep 17 00:00:00 2001 >From: Chris Cormack <chrisc@catalyst.net.z> >Date: Wed, 13 Apr 2016 21:20:36 +0000 >Subject: [PATCH] Bug 12478 : Fixing the tests for > Koha::SearchEngine::Elasticsearch::Search > >perl t/Koha_SearchEngine_Elasticsearch_Search.t >--- > ...Search.t => Koha_SearchEngine_Elasticsearch_Search.t} | 16 +++++++++------- > 1 file changed, 9 insertions(+), 7 deletions(-) > rename t/{Koha_ElasticSearch_Search.t => Koha_SearchEngine_Elasticsearch_Search.t} (59%) > >diff --git a/t/Koha_ElasticSearch_Search.t b/t/Koha_SearchEngine_Elasticsearch_Search.t >similarity index 59% >rename from t/Koha_ElasticSearch_Search.t >rename to t/Koha_SearchEngine_Elasticsearch_Search.t >index 081b162..402a881 100644 >--- a/t/Koha_ElasticSearch_Search.t >+++ b/t/Koha_SearchEngine_Elasticsearch_Search.t >@@ -1,7 +1,7 @@ > # > #=============================================================================== > # >-# FILE: Koha_ElasticSearch_Search.t >+# FILE: Koha_SearchEngine_Elasticsearch_Search.t > # > # DESCRIPTION: > # >@@ -19,11 +19,14 @@ use strict; > use warnings; > > use Test::More tests => 5; # last test to print >+use Koha::SearchEngine::Elasticsearch::QueryBuilder; > >-use_ok('Koha::ElasticSearch::Search'); >+my $builder = Koha::SearchEngine::Elasticsearch::QueryBuilder->new( { index => 'mydb' } ); >+ >+use_ok('Koha::SearchEngine::Elasticsearch::Search'); > > ok( >- my $searcher = Koha::ElasticSearch::Search->new( >+ my $searcher = Koha::SearchEngine::Elasticsearch::Search->new( > { 'nodes' => ['localhost:9200'], 'index' => 'mydb' } > ), > 'Creating a Koha::ElasticSearch::Search object' >@@ -31,8 +34,7 @@ ok( > > is( $searcher->index, 'mydb', 'Testing basic accessor' ); > >-ok( $searcher->connect, 'Connect to ElasticSearch server' ); >-ok( my $results = $searcher->search( { record => 'easy' } ), 'Do a search ' ); >+ok( my $query = $builder->build_query('easy'), 'Build a search query'); >+ >+ok( my $results = $searcher->search( $query) , 'Do a search ' ); > >-ok( my $marcresults = $searcher->marc_search( { record => 'Fish' } ), >- 'Do a marc search' ); >-- >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 12478
:
29204
|
31128
|
31129
|
33136
|
33137
|
33138
|
33139
|
33140
|
33141
|
35654
|
40903
|
42030
|
42031
|
42032
|
42033
|
42062
|
42063
|
42064
|
42065
|
42066
|
42067
|
42068
|
42069
|
42392
|
42393
|
43127
|
43128
|
43129
|
43130
|
43131
|
43132
|
43133
|
43134
|
43140
|
43141
|
43142
|
43148
|
43345
|
43346
|
43347
|
43348
|
43349
|
43350
|
43351
|
43352
|
43373
|
47767
|
47768
|
50115
|
50159
|
50211
|
50212
|
50213
|
50214
|
50245
|
50246
|
50291
|
50292