Created attachment 94497 [details] [review] Bug 23859: Update tests to new style Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 94498 [details] [review] Bug 23859: Regression tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 94499 [details] [review] Bug 23859: Make POST add the Location header on cities endpoint According to the coding guidelines, this endpoint should be adding the Location header on POST actions. To test: 1. Apply the tests patch 2. Run: $ kshell k$ prove t/db_dependent/api/v1/cities.t => FAIL: Tests fail! 3. Apply this patch 4. Repeat (1) => SUCCESS: Tests pass! 5. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 94500 [details] [review] Bug 23859: Update tests to new style The /cities endpoint is refered in several places as the reference implementation of a route for devs to pick it for copy and pasting. Yet, it is outdated in terms of how the tests are written. This patch rewrites some bits so it uses BASIC auth and the built-ins Test::Mojo provides. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 94938 [details] [review] Bug 23859: Regression tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 94939 [details] [review] Bug 23859: Make POST add the Location header on cities endpoint According to the coding guidelines, this endpoint should be adding the Location header on POST actions. To test: 1. Apply the tests patch 2. Run: $ kshell k$ prove t/db_dependent/api/v1/cities.t => FAIL: Tests fail! 3. Apply this patch 4. Repeat (1) => SUCCESS: Tests pass! 5. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 94940 [details] [review] Bug 23859: Update tests to new style The /cities endpoint is refered in several places as the reference implementation of a route for devs to pick it for copy and pasting. Yet, it is outdated in terms of how the tests are written. This patch rewrites some bits so it uses BASIC auth and the built-ins Test::Mojo provides. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Trivial patch that improves the consistency of our API's. Passing QA
Nice work! Pushed to master for 19.11.00