Bug 14346 - t/Biblio.t fails because of new warning
Summary: t/Biblio.t fails because of new warning
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: Tomás Cohen Arazi
QA Contact: Galen Charlton
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-05 17:52 UTC by Tomás Cohen Arazi
Modified: 2016-12-05 21:22 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 14346: t/Biblio.t fails because of new warning (2.97 KB, patch)
2015-06-05 19:10 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 14346: (folowup) Fix previously existing POD (1.26 KB, patch)
2015-06-05 19:10 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 14346: t/Biblio.t fails because of new warning (3.02 KB, patch)
2015-06-05 22:17 UTC, M. Tompsett
Details | Diff | Splinter Review
Bug 14346: (folowup) Fix previously existing POD (1.32 KB, patch)
2015-06-05 22:17 UTC, M. Tompsett
Details | Diff | Splinter Review
[PASSED QA] Bug 14346: t/Biblio.t fails because of new warning (3.09 KB, patch)
2015-06-06 17:14 UTC, Katrin Fischer
Details | Diff | Splinter Review
[PASSED QA] Bug 14346: (folowup) Fix previously existing POD (1.38 KB, patch)
2015-06-06 17:15 UTC, Katrin Fischer
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 2015-06-05 17:52:14 UTC
Running

 $ prove t/Biblio.t

fails because of us now using DBIx to retrieve sysprefs. Then our mocked DBI is not "supported" by DBIx hence a warning that makes our test fail (there is one more warning now).

The cool thing about this, is that it actually helped spot a situation where GetMarcBiblio is doing wrong things because is not checking its parameters are undefined, so we have the chance to fix it.
Comment 1 Tomás Cohen Arazi 2015-06-05 19:10:02 UTC Comment hidden (obsolete)
Comment 2 Tomás Cohen Arazi 2015-06-05 19:10:06 UTC Comment hidden (obsolete)
Comment 3 M. Tompsett 2015-06-05 22:17:03 UTC Comment hidden (obsolete)
Comment 4 M. Tompsett 2015-06-05 22:17:09 UTC Comment hidden (obsolete)
Comment 5 M. Tompsett 2015-06-05 22:18:28 UTC
Tested both patches together. Looked at tests, and they make sense to me, and the one was modified to match the added carp message.
Comment 6 Katrin Fischer 2015-06-06 17:14:56 UTC
Created attachment 39944 [details] [review]
[PASSED QA] Bug 14346: t/Biblio.t fails because of new warning

Running

 $ prove t/Biblio.t

fails because of us now using DBIx to retrieve sysprefs. Then our mocked DBI is not "supported" by DBIx hence a warning that makes our test fail (there is one more warning now).

The cool thing about this, is that it actually helped spot a situation where GetMarcBiblio is doing wrong things because is not checking its parameters are undefined, so we have the chance to fix it.

This patch makes GetMarcBiblio return undef if no biblionumber is passed, and
also raises a conveniently carped warning. This change is tested in t/Biblio.t with new tests.

To test:
- In current master, run
  $ prove t/Biblio.t
=> FAIL: a test detects a wrong warning count and fails.
- Apply the patch and run
  $ prove t/Biblio.t
=> SUCCESS: Tests now pass, and there are 2 new ones.
- Sign off :-D

Regards

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 7 Katrin Fischer 2015-06-06 17:15:08 UTC
Created attachment 39945 [details] [review]
[PASSED QA] Bug 14346: (folowup) Fix previously existing POD

This patch makes koha-qa.pl happy by fixing POD issues prior
to this bug.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 8 Tomás Cohen Arazi 2015-06-07 21:59:45 UTC
Patches pushed to master.