Bug 16320

Summary: Refactor ILSDI_Services.t so it uses TestBuilder
Product: Koha Reporter: Tomás Cohen Arazi (tcohen) <tomascohen>
Component: Test SuiteAssignee: Tomás Cohen Arazi (tcohen) <tomascohen>
Status: CLOSED FIXED QA Contact: Marcel de Rooy <m.de.rooy>
Severity: enhancement    
Priority: P5 - low CC: hector.hecaxmmx, kyle, m.de.rooy
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12267
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 16155    
Bug Blocks:    
Attachments: Bug 16320: Refactor ILSDI_Services.t so it uses TestBuilder
Bug 16320: Refactor ILSDI_Services.t so it uses TestBuilder
Bug 16320: [QA Follow-up] Remove warnings from ILSDI/Services.pm
Bug 16320: [QA Follow-up] Remove warnings from ILSDI/Services.pm
[SIGNED-OFF]Bug 16320: Refactor ILSDI_Services.t so it uses TestBuilder
[SIGNED-OFF]Bug 16320: [QA Follow-up] Remove warnings from ILSDI/Services.pm
Bug 16320: [QA Follow-up] Fix borrower attribute test in ILSDI_Services

Description Tomás Cohen Arazi (tcohen) 2016-04-21 16:10:47 UTC
ILSDI_Services.t needs a rewrite so it doesn't use fixed data or expects it from the DB.
Comment 1 Tomás Cohen Arazi (tcohen) 2016-04-21 16:13:11 UTC Comment hidden (obsolete)
Comment 2 Héctor Eduardo Castro Avalos 2016-04-21 17:23:40 UTC
Hi Tomás

Test pass successful but give me this
Use of uninitialized value in string eq at /home/koha/kohaclone/C4/ILSDI/Services.pm line 373.
Use of uninitialized value in string eq at /home/koha/kohaclone/C4/ILSDI/Services.pm line 390.
Use of uninitialized value in string eq at /home/koha/kohaclone/C4/ILSDI/Services.pm line 399.
Use of uninitialized value in string eq at /home/koha/kohaclone/C4/ILSDI/Services.pm line 423.

Is this Ok?
Comment 3 Marcel de Rooy 2016-04-22 11:54:04 UTC Comment hidden (obsolete)
Comment 4 Marcel de Rooy 2016-04-22 11:54:07 UTC Comment hidden (obsolete)
Comment 5 Marcel de Rooy 2016-04-22 11:55:08 UTC
(In reply to Héctor Eduardo Castro Avalos from comment #2)
> Hi Tomás
> 
> Test pass successful but give me this
> Use of uninitialized value in string eq at
> /home/koha/kohaclone/C4/ILSDI/Services.pm line 373.
> Use of uninitialized value in string eq at
> /home/koha/kohaclone/C4/ILSDI/Services.pm line 390.
> Use of uninitialized value in string eq at
> /home/koha/kohaclone/C4/ILSDI/Services.pm line 399.
> Use of uninitialized value in string eq at
> /home/koha/kohaclone/C4/ILSDI/Services.pm line 423.
> 
> Is this Ok?

Hector: Please add your signoff in order to get it thru QA. Thanks.
Comment 6 Marcel de Rooy 2016-04-22 12:06:32 UTC
PatronNotFount
Comment 7 Tomás Cohen Arazi (tcohen) 2016-04-22 12:30:31 UTC Comment hidden (obsolete)
Comment 8 Héctor Eduardo Castro Avalos 2016-04-22 14:03:05 UTC
Created attachment 50587 [details] [review]
[SIGNED-OFF]Bug 16320: Refactor ILSDI_Services.t so it uses TestBuilder

This patch refactors the tests so they are corerctly built using TestBuilder
and wrapper inside a DB transaction in a less ambiguous way.

To test:
- Verify that the tests pass with the patch:
- Run:
  $ prove t/db_dependent/ILSDI_Services.t
=> SUCCESS: Tests pass
- Sign off :-D

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Comment 9 Héctor Eduardo Castro Avalos 2016-04-22 14:03:16 UTC
Created attachment 50588 [details] [review]
[SIGNED-OFF]Bug 16320: [QA Follow-up] Remove warnings from ILSDI/Services.pm

Removes:
Use of uninitialized value in string eq at /home/koha/kohaclone/C4/ILSDI/Services.pm line 373.
Use of uninitialized value in string eq at /home/koha/kohaclone/C4/ILSDI/Services.pm line 390.
Use of uninitialized value in string eq at /home/koha/kohaclone/C4/ILSDI/Services.pm line 399.
Use of uninitialized value in string eq at /home/koha/kohaclone/C4/ILSDI/Services.pm line 423.

Test plan:
Run t/db_dependent/ILSDI_Services.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Comment 10 Marcel de Rooy 2016-04-22 15:25:04 UTC
Thanks Hector and Tomas.
Can pass QA now.
@RM: This may go separately from 16155. Applies and passes both ways.
Comment 11 Marcel de Rooy 2016-04-28 07:02:50 UTC
Created attachment 50873 [details] [review]
Bug 16320: [QA Follow-up] Fix borrower attribute test in ILSDI_Services

Since bug 12267 removed the password option, this test should be
adjusted.

Test plan:
Run the test.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 12 Kyle M Hall (khall) 2016-04-29 16:05:14 UTC
Pushed to master for the Koha 16.05 release. Thanks Tomas!