Bug 16453 - Elasticsearch tests should be skipped if configuration entry missing
Summary: Elasticsearch tests should be skipped if configuration entry missing
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Tomás Cohen Arazi
QA Contact: Jonathan Druart
URL:
Keywords:
Depends on: 12478
Blocks:
  Show dependency treegraph
 
Reported: 2016-05-05 14:53 UTC by Tomás Cohen Arazi
Modified: 2016-12-05 21:23 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 16453: Make Elasticsearch tests be skipped if configuration entry missing (5.37 KB, patch)
2016-05-05 16:27 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 16453: Make Elasticsearch tests be skipped if configuration entry missing (5.43 KB, patch)
2016-05-05 21:42 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 16453: Make Elasticsearch tests be skipped if configuration entry missing (5.48 KB, patch)
2016-05-05 23:05 UTC, Jesse Weaver
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Tomás Cohen Arazi 2016-05-05 14:53:15 UTC
t/db_dependent/Koha_ElasticSearch_Indexer.t currently has hardcoded information about the ES server it needs to use.
Comment 1 Tomás Cohen Arazi 2016-05-05 16:27:27 UTC Comment hidden (obsolete)
Comment 2 Chris Cormack 2016-05-05 21:42:00 UTC Comment hidden (obsolete)
Comment 3 Katrin Fischer 2016-05-05 22:00:04 UTC
I have problems testing this because I am missing ES dependencies (old Ubuntu still). Can someone else take a look at this please?
Comment 4 Jesse Weaver 2016-05-05 23:05:20 UTC
Created attachment 51273 [details] [review]
Bug 16453: Make Elasticsearch tests be skipped if configuration entry missing

The current tests fail to run if the configuration entry is missing. This is
problematic on jenkins and should be fixed.

To test:
- On master, having koha-conf.xml without (or commented) an <elasticsearch> entry
- Run:
  $ prove t/db_dependent/Koha_ElasticSearch_Indexer.t \
          t/db_dependent/Koha_SearchEngine_Elasticsearch_Search.t -v
=> FAIL: Tests fail due to missing configuration entry
- Apply the patch
- Run:
  $ prove t/db_dependent/Koha_ElasticSearch_Indexer.t \
          t/db_dependent/Koha_SearchEngine_Elasticsearch_Search.t -v
=> SUCCESS: Tests pass, and the ES-configuration-dependent tests are skipped
- Have elasticsearch running and the koha-conf.xml entry
- Run:
  $ prove t/db_dependent/Koha_ElasticSearch_Indexer.t \
          t/db_dependent/Koha_SearchEngine_Elasticsearch_Search.t -v
=> SUCCESS: Same results as without the patch
- Sign off

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Comment 5 Brendan Gallagher 2016-05-06 03:47:35 UTC
Pushed To Master - Should be in the May 2016 Release.  Thanks!
Comment 6 Julian Maurice 2016-05-16 09:39:03 UTC
Not needed in stable versions, status changed to RESOLVED