Bug 15956 - Rearranging some SIP unit tests (testable without SIP server)
Summary: Rearranging some SIP unit tests (testable without SIP server)
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Marcel de Rooy
QA Contact: Galen Charlton
URL:
Keywords:
Depends on: 13871 15947
Blocks:
  Show dependency treegraph
 
Reported: 2016-03-02 12:38 UTC by Marcel de Rooy
Modified: 2016-12-05 21:27 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 15956: Rearranging some SIP unit tests (4.03 KB, patch)
2016-03-02 13:47 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 15956: Remove warn from handle_patron_status (1.29 KB, patch)
2016-03-02 13:47 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 15956: Move SIPILS.t to SIP/ILS.t (1.78 KB, patch)
2016-03-02 13:47 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 15956: New unit test SIP/Message.t (6.70 KB, patch)
2016-03-02 15:57 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 15956: New unit test SIP/Message.t (9.54 KB, patch)
2016-03-04 09:07 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 15956: Rearranging some SIP unit tests (4.03 KB, patch)
2016-03-04 10:14 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 15956: Remove warn from handle_patron_status (1.34 KB, patch)
2016-03-04 10:14 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 15956: Move SIPILS.t to SIP/ILS.t (1.78 KB, patch)
2016-03-04 10:14 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 15956: New unit test SIP/Message.t (9.54 KB, patch)
2016-03-04 10:14 UTC, Marcel de Rooy
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 15956: Rearranging some SIP unit tests (4.06 KB, patch)
2016-04-14 14:28 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 15956: Remove warn from handle_patron_status (1.37 KB, patch)
2016-04-14 14:28 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 15956: Move SIPILS.t to SIP/ILS.t (1.81 KB, patch)
2016-04-14 14:28 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 15956: New unit test SIP/Message.t (9.78 KB, patch)
2016-04-14 14:28 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review
[PASSED QA] Bug 15956: Rearranging some SIP unit tests (4.11 KB, patch)
2016-04-26 22:07 UTC, Katrin Fischer
Details | Diff | Splinter Review
[PASSED QA] Bug 15956: Remove warn from handle_patron_status (1.43 KB, patch)
2016-04-26 22:07 UTC, Katrin Fischer
Details | Diff | Splinter Review
[PASSED QA] Bug 15956: Move SIPILS.t to SIP/ILS.t (1.86 KB, patch)
2016-04-26 22:08 UTC, Katrin Fischer
Details | Diff | Splinter Review
[PASSED QA] Bug 15956: New unit test SIP/Message.t (9.83 KB, patch)
2016-04-26 22:08 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 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!