Bug 17651

Summary: t/db_dependent/api/v1/patrons.t is failing
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Architecture, internals, and plumbingAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: kyle, martin.renvoize, tomascohen
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17621
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17654
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21219
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 17651: borrowers.updated_on can be null - swagger def
Bug 17651: borrowers.updated_on can be null - swagger def

Description Jonathan Druart 2016-11-17 15:07:25 UTC
[Thu Nov 17 14:16:50 2016] [debug] GET "/api/v1/patrons"
[Thu Nov 17 14:16:50 2016] [debug] Routing to a callback
[Thu Nov 17 14:16:50 2016] [debug] Nothing has been rendered, expecting delayed response
[Thu Nov 17 14:16:50 2016] [debug] Swagger2 routing to controller "Koha::REST::V1::Patron" and action "list"
[Thu Nov 17 14:16:50 2016] [debug] 500 Internal Server Error (0.121564s, 8.226/s)
ok 15 - GET /api/v1/patrons
not ok 16 - 200
#   Failed test '200 OK'
#   at t/db_dependent/api/v1/patrons.t line 122.
#          got: '500'
#     expected: '200'
Comment 1 Jonathan Druart 2016-11-17 15:07:40 UTC
If borrowers.updated_on is null, the tests will fail
Comment 2 Jonathan Druart 2016-11-17 15:15:02 UTC
Created attachment 57604 [details] [review]
Bug 17651: borrowers.updated_on can be null - swagger def

The swagger file does not consider borrowers.updated_on as a nullable
value, it should

Test plan:
0/ Do not apply this patch
1/ update borrowers set updated_on=null;
2/ prove t/db_dependent/api/v1/patrons.t
=> Fail
3/ Apply this patch
4/ prove t/db_dependent/api/v1/patrons.t
=> green
Comment 3 Tomás Cohen Arazi (tcohen) 2016-11-17 16:03:30 UTC
Created attachment 57607 [details] [review]
Bug 17651: borrowers.updated_on can be null - swagger def

The swagger file does not consider borrowers.updated_on as a nullable
value, it should

Test plan:
0/ Do not apply this patch
1/ update borrowers set updated_on=null;
2/ prove t/db_dependent/api/v1/patrons.t
=> Fail
3/ Apply this patch
4/ prove t/db_dependent/api/v1/patrons.t
=> green

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 4 Tomás Cohen Arazi (tcohen) 2016-11-17 17:33:01 UTC
Trivial tests fix, passing QA.
Comment 5 Kyle M Hall (khall) 2016-11-18 13:39:40 UTC
Pushed to master for 16.11, thanks Jonathan!