Bug 17603 - Remove itemtype-related Borrower_Discharge.t warnings
Summary: Remove itemtype-related Borrower_Discharge.t warnings
Status: RESOLVED 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: Marcel de Rooy
URL:
Whiteboard:
Keywords:
Depends on: 14598
Blocks:
  Show dependency treegraph
 
Reported: 2016-11-09 19:45 UTC by Tomás Cohen Arazi
Modified: 2017-06-14 22:17 UTC (History)
5 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 17603: Remove itemtype-related Borrower_Discharge.t warnings (2.41 KB, patch)
2016-11-09 19:47 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
[SIGNED-OFF]Bug 17603: Remove itemtype-related Borrower_Discharge.t warnings (2.49 KB, patch)
2016-11-10 17:08 UTC, Héctor Eduardo Castro Avalos
Details | Diff | Splinter Review
Bug 17603: Remove itemtype-related Borrower_Discharge.t warnings (2.57 KB, patch)
2016-11-11 07:12 UTC, Marcel de Rooy
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-11-09 19:45:10 UTC

    
Comment 1 Tomás Cohen Arazi 2016-11-09 19:47:31 UTC
Created attachment 57397 [details] [review]
Bug 17603: Remove itemtype-related Borrower_Discharge.t warnings

This patch makes t/db_dependent/Patron/Borrower_Discharge.t create
good sample data for its tests. It does so by creating a random
itemtype.

To test:
- Run
  $ prove t/db_dependent/Patron/Borrower_Discharge.t
=> FAIL: lots of warnings about "item-level_itypes set but no itemtype
set for item"
- Apply the patch
- Run:
  $ prove t/db_dependent/Patron/Borrower_Discharge.t
=> SUCCESS: Tests are green, and no warnings.
- Sign off :-D

Sponsored-by: ByWater Solutions
Comment 2 Bernardo Gonzalez Kriegel 2016-11-09 22:35:53 UTC
No errors for me without patch
(master commit 80c80ca683217455221e15e0c24a81d5e60e49e0)

t/db_dependent/Patron/Borrower_Discharge.t .. ok     
All tests successful.
Files=1, Tests=18,  3 wallclock secs ( 0.02 usr  0.00 sys +  1.89 cusr  0.11 csys =  2.02 CPU)
Result: PASS
Comment 3 Tomás Cohen Arazi 2016-11-09 22:48:42 UTC
(In reply to Bernardo Gonzalez Kriegel from comment #2)
> No errors for me without patch
> (master commit 80c80ca683217455221e15e0c24a81d5e60e49e0)
> 
> t/db_dependent/Patron/Borrower_Discharge.t .. ok     
> All tests successful.
> Files=1, Tests=18,  3 wallclock secs ( 0.02 usr  0.00 sys +  1.89 cusr  0.11
> csys =  2.02 CPU)
> Result: PASS

Don't you get warnings? This is what I get:

kohadev-koha@kohadevbox:/home/vagrant/kohaclone$ prove t/db_dependent/Patron/Borrower_Discharge.t
t/db_dependent/Patron/Borrower_Discharge.t .. item-level_itypes set but no itemtype set for item (1291) at /home/vagrant/kohaclone/Koha/Schema/Result/Item.pm line 698.
t/db_dependent/Patron/Borrower_Discharge.t .. 1/18 item-level_itypes set but no itemtype set for item (1291) at /home/vagrant/kohaclone/Koha/Schema/Result/Item.pm line 698.
t/db_dependent/Patron/Borrower_Discharge.t .. ok
All tests successful.
Files=1, Tests=18,  3 wallclock secs ( 0.03 usr  0.00 sys +  1.72 cusr  0.26 csys =  2.01 CPU)
Result: PASS
kohadev-koha@kohadevbox:/home/vagrant/kohaclone$
Comment 4 Héctor Eduardo Castro Avalos 2016-11-10 17:08:50 UTC
Created attachment 57434 [details] [review]
[SIGNED-OFF]Bug 17603: Remove itemtype-related Borrower_Discharge.t warnings

This patch makes t/db_dependent/Patron/Borrower_Discharge.t create
good sample data for its tests. It does so by creating a random
itemtype.

To test:
- Run
  $ prove t/db_dependent/Patron/Borrower_Discharge.t
=> FAIL: lots of warnings about "item-level_itypes set but no itemtype
set for item"
- Apply the patch
- Run:
  $ prove t/db_dependent/Patron/Borrower_Discharge.t
=> SUCCESS: Tests are green, and no warnings.
- Sign off :-D

Sponsored-by: ByWater Solutions
Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Comment 5 Marcel de Rooy 2016-11-11 07:12:51 UTC
Created attachment 57441 [details] [review]
Bug 17603: Remove itemtype-related Borrower_Discharge.t warnings

This patch makes t/db_dependent/Patron/Borrower_Discharge.t create
good sample data for its tests. It does so by creating a random
itemtype.

To test:
- Run
  $ prove t/db_dependent/Patron/Borrower_Discharge.t
=> FAIL: lots of warnings about "item-level_itypes set but no itemtype
set for item"
- Apply the patch
- Run:
  $ prove t/db_dependent/Patron/Borrower_Discharge.t
=> SUCCESS: Tests are green, and no warnings.
- Sign off :-D

Sponsored-by: ByWater Solutions
Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 6 Kyle M Hall 2016-11-12 02:38:24 UTC
Pushed to master for 16.11, thanks Tomas!
Comment 7 Mason James 2016-12-14 11:08:37 UTC
Pushed to 16.05.x, for 16.05.06 release