Bug 27062

Summary: pickup_location tests don't deal correctly with existing libraries
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Test SuiteAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: andrewfh
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25540
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.11.00
Bug Depends on: 26963, 26984, 27002    
Bug Blocks:    
Attachments: Bug 27062: Fix pickup_location tests when existing libraries exist

Description Jonathan Druart 2020-11-20 09:31:25 UTC
If there are existing libraries in the DB, the tests will fail.

There were several changes related to those tests recently, this bug report is a follow-up for them.
Comment 1 Jonathan Druart 2020-11-20 09:33:36 UTC
Was failing a lot today
https://jenkins.koha-community.org/job/Koha_Master_U18/954/consoleFull
https://jenkins.koha-community.org/job/Koha_Master_U16/134/consoleFull
https://jenkins.koha-community.org/job/Koha_Master_D9_MDB_Latest/449/consoleFull


08:38:45 koha_1       |     #   Failed test 'ReservesControlBranch: ItemHomeLibrary, biblio1, patron1 should return 27 but returns 18'
08:38:45 koha_1       |     #   at t/db_dependent/Koha/Biblio.t line 405.
08:38:45 koha_1       | 
08:38:45 koha_1       |     #   Failed test 'ReservesControlBranch: PatronLibrary, biblio1, patron1 should return 27 but returns 18'
08:38:45 koha_1       |     #   at t/db_dependent/Koha/Biblio.t line 405.
08:38:45 koha_1       |     # Looks like you failed 2 tests of 8.
08:38:45 koha_1       | 
08:38:45 koha_1       | #   Failed test 'pickup_locations'
08:38:45 koha_1       | #   at t/db_dependent/Koha/Biblio.t line 422.
Comment 2 Jonathan Druart 2020-11-20 09:33:59 UTC
Created attachment 113868 [details] [review]
Bug 27062: Fix pickup_location tests when existing libraries exist

If there are existing libraries in the DB, the tests will fail.

There were several changes related to those tests recently, this bug report is a follow-up for them.

bug 26984, bug 27002 and bug 26963.
Comment 3 Jonathan Druart 2020-11-20 09:34:38 UTC
This is not perfect, but I need the jenkins happy. Feel free to follow-up if you have a better fix.
Comment 4 Jonathan Druart 2020-11-20 09:37:46 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 5 Andrew Fuerste-Henry 2020-12-10 21:56:07 UTC
Doesn't apply cleanly to 20.05, please rebase
Comment 6 Jonathan Druart 2020-12-11 08:50:34 UTC
No need to backport I'd say.
Comment 7 Jonathan Druart 2021-01-07 11:06:31 UTC
Andrew, actually all the 20.05 jobs are failing because of this. The patch applies correctly now, can you backport it and see if it fixes the failure?