Bug 15956

Summary: Rearranging some SIP unit tests (testable without SIP server)
Product: Koha Reporter: Marcel de Rooy <m.de.rooy>
Component: Test SuiteAssignee: Marcel de Rooy <m.de.rooy>
Status: CLOSED FIXED QA Contact: Galen Charlton <gmcharlt>
Severity: enhancement    
Priority: P5 - low CC: bgkriegel, kyle
Version: master   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13871
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26700
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 13871, 15947    
Bug Blocks:    
Attachments: Bug 15956: Rearranging some SIP unit tests
Bug 15956: Remove warn from handle_patron_status
Bug 15956: Move SIPILS.t to SIP/ILS.t
Bug 15956: New unit test SIP/Message.t
Bug 15956: New unit test SIP/Message.t
Bug 15956: Rearranging some SIP unit tests
Bug 15956: Remove warn from handle_patron_status
Bug 15956: Move SIPILS.t to SIP/ILS.t
Bug 15956: New unit test SIP/Message.t
[SIGNED-OFF] Bug 15956: Rearranging some SIP unit tests
[SIGNED-OFF] Bug 15956: Remove warn from handle_patron_status
[SIGNED-OFF] Bug 15956: Move SIPILS.t to SIP/ILS.t
[SIGNED-OFF] Bug 15956: New unit test SIP/Message.t
[PASSED QA] Bug 15956: Rearranging some SIP unit tests
[PASSED QA] Bug 15956: Remove warn from handle_patron_status
[PASSED QA] Bug 15956: Move SIPILS.t to SIP/ILS.t
[PASSED QA] Bug 15956: New unit test SIP/Message.t

Description Marcel de Rooy 2016-03-02 12:38:15 UTC
This report is a follow-up for bug 13871 and bug 15947.
The two tests SIP_ILS.t and SIPILS.t (what's in a name) will be broken into a few more specific tests.
Will add tests for handling Patron Status request and Patron Info request too.
Comment 1 Marcel de Rooy 2016-03-02 13:47:08 UTC Comment hidden (obsolete)
Comment 2 Marcel de Rooy 2016-03-02 13:47:11 UTC Comment hidden (obsolete)
Comment 3 Marcel de Rooy 2016-03-02 13:47:15 UTC Comment hidden (obsolete)
Comment 4 Marcel de Rooy 2016-03-02 15:57:23 UTC Comment hidden (obsolete)
Comment 5 Marcel de Rooy 2016-03-04 09:07:37 UTC Comment hidden (obsolete)
Comment 6 Marcel de Rooy 2016-03-04 10:14:37 UTC Comment hidden (obsolete)
Comment 7 Marcel de Rooy 2016-03-04 10:14:41 UTC Comment hidden (obsolete)
Comment 8 Marcel de Rooy 2016-03-04 10:14:45 UTC Comment hidden (obsolete)
Comment 9 Marcel de Rooy 2016-03-04 10:14:48 UTC Comment hidden (obsolete)
Comment 10 Marcel de Rooy 2016-03-04 10:36:40 UTC
I have rebased this on top of bug 13871.
So please apply that first if not yet pushed.
The commit message should be read in that light.
Comment 11 Bernardo Gonzalez Kriegel 2016-04-14 14:28:13 UTC Comment hidden (obsolete)
Comment 12 Bernardo Gonzalez Kriegel 2016-04-14 14:28:21 UTC Comment hidden (obsolete)
Comment 13 Bernardo Gonzalez Kriegel 2016-04-14 14:28:28 UTC Comment hidden (obsolete)
Comment 14 Bernardo Gonzalez Kriegel 2016-04-14 14:28:38 UTC Comment hidden (obsolete)
Comment 15 Marcel de Rooy 2016-04-14 18:33:18 UTC
(In reply to Bernardo Gonzalez Kriegel from comment #14)
> Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

Thx Bernardo!
Comment 16 Katrin Fischer 2016-04-26 22:07:48 UTC
Created attachment 50765 [details] [review]
[PASSED QA] Bug 15956: Rearranging some SIP unit tests

The original SIP_ILS.t is split up into SIP/Patron.t and
SIP/Transaction.t.
The assumption on a hardcoded existing and non-existing card number is
replaced by adding and deleting a card number (:patron) with TestBuilder.

Test plan:
Run SIP/Patron.t
Run SIP/Transaction.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 17 Katrin Fischer 2016-04-26 22:07:56 UTC
Created attachment 50766 [details] [review]
[PASSED QA] Bug 15956: Remove warn from handle_patron_status

Removes a warn and some commented warns.

Test plan:
Nothing to do here. Will be covered later by additional unit test.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 18 Katrin Fischer 2016-04-26 22:08:00 UTC
Created attachment 50767 [details] [review]
[PASSED QA] Bug 15956: Move SIPILS.t to SIP/ILS.t

Move the file. Some trivial (cosmetic) edits: whitespace, comments.

Test plan:
Run SIP/ILS.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 19 Katrin Fischer 2016-04-26 22:08:07 UTC
Created attachment 50768 [details] [review]
[PASSED QA] Bug 15956: New unit test SIP/Message.t

This patch adds a unit test for the handlers of Patron Status
and Patron Info requests. It can be extended with test for the
other handlers later (hopefully).

Note: The tests have been written for SIP protocol version 2.

Test plan:
Run t/db_dependent/SIP/Message.t.

Note: If bug 13871 has not yet been pushed, test 12 (subtest 1) should fail
with something like 'Code AF not found'. Same for test 15 of subtest 2.
That is no problem; after that push, all tests should pass.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

All tests pass
t/db_dependent/SIP/ILS.t .......... ok
t/db_dependent/SIP/Message.t ...... ok
t/db_dependent/SIP/Patron.t ....... ok
t/db_dependent/SIP/Transaction.t .. ok
All tests successful.

No errors

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 20 Marcel de Rooy 2016-04-27 09:15:14 UTC
(In reply to Katrin Fischer from comment #19)
> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Thanks, Katrin !
Comment 21 Kyle M Hall 2016-04-29 13:45:23 UTC
Pushed to master for the May 2016 release. Asante Marcel!