Bug 17651 - t/db_dependent/api/v1/patrons.t is failing
Summary: t/db_dependent/api/v1/patrons.t is failing
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-17 15:07 UTC by Jonathan Druart
Modified: 2018-08-14 14:29 UTC (History)
3 users (show)

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


Attachments
Bug 17651: borrowers.updated_on can be null - swagger def (1.26 KB, patch)
2016-11-17 15:15 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 17651: borrowers.updated_on can be null - swagger def (1.31 KB, patch)
2016-11-17 16:03 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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 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 2016-11-17 17:33:01 UTC
Trivial tests fix, passing QA.
Comment 5 Kyle M Hall 2016-11-18 13:39:40 UTC
Pushed to master for 16.11, thanks Jonathan!