Bug 13277 - t/SuggestionEngine_AuthorityFile.t shouldn't depend on the DB
Summary: t/SuggestionEngine_AuthorityFile.t shouldn't depend on the DB
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Chris Cormack
QA Contact: Galen Charlton
URL:
Keywords:
Depends on:
Blocks: 13275
  Show dependency treegraph
 
Reported: 2014-11-18 03:59 UTC by Tomás Cohen Arazi
Modified: 2015-06-04 23:33 UTC (History)
1 user (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 13277: t/SuggestionEngine_AuthorityFile.t shouldn't depend on the DB (2.66 KB, patch)
2014-11-18 04:02 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 13277: t/SuggestionEngine_AuthorityFile.t shouldn't depend on the DB (2.81 KB, patch)
2014-11-18 07:45 UTC, Magnus Enger
Details | Diff | Splinter Review
Bug 13277: t/SuggestionEngine_AuthorityFile.t shouldn't depend on the DB (2.80 KB, patch)
2014-11-19 20:02 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 13277: (QA followup) use t::lib::Mocks (1.02 KB, patch)
2014-11-19 21:09 UTC, Tomás Cohen Arazi
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 2014-11-18 03:59:40 UTC
t/SuggestionEngine_AuthorityFile.t should mock the DB
Comment 1 Tomás Cohen Arazi 2014-11-18 04:02:08 UTC Comment hidden (obsolete)
Comment 2 Magnus Enger 2014-11-18 07:45:42 UTC Comment hidden (obsolete)
Comment 3 Katrin Fischer 2014-11-19 20:02:24 UTC
Created attachment 33698 [details] [review]
Bug 13277: t/SuggestionEngine_AuthorityFile.t shouldn't depend on the DB

To reproduce:
- Stop your MySQL server:
  $ sudo service mysql stop
- Run
  $ prove t/SuggestionEngine_AuthorityFile.t
=> FAIL: some tests fail because of mysql stopped

To test (MySQL still stopped)
- Apply the patch
- Run
  $ prove t/SuggestionEngine_AuthorityFile.t
=> SUCCESS: tests pass because the ycan be loaded regardless of
            the absence of the DB server
- Sign off :-D

Regards

Signed-off-by: Magnus Enger <digitalutvikling@gmail.com>
Turned off MySQL and ran the tests before and after the patch.
Works as advertized.
Comment 4 Tomás Cohen Arazi 2014-11-19 21:09:57 UTC
Created attachment 33712 [details] [review]
Bug 13277: (QA followup) use t::lib::Mocks

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Comment 5 Tomás Cohen Arazi 2014-11-19 21:13:16 UTC
Patch pushed to master.