Description
Tomás Cohen Arazi (tcohen)
2019-10-21 17:16:08 UTC
Created attachment 94480 [details] [review] Bug 23858: Regression tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Created attachment 94481 [details] [review] Bug 23858: Make POST add the Location header on vendors 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/acquisition_vendors.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 94482 [details] [review] Bug 23858: (follow-up) Return code fix Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Comment on attachment 94481 [details] [review] Bug 23858: Make POST add the Location header on vendors endpoint Review of attachment 94481 [details] [review]: ----------------------------------------------------------------- In the commit message "prove t/db_dependent/api/v1/acquisition_vendors.t" should be "prove t/db_dependent/api/v1/acquisitions_vendors.t" Instead of making a follow-up to your own commit please squash the 201 regression tests to the first patch "Bug 23858: Regression tests" and make the fix separate (In reply to Joonas Kylmälä from comment #5) > Instead of making a follow-up to your own commit please squash the 201 > regression tests to the first patch "Bug 23858: Regression tests" and make > the fix separate Well, it is not a 'fix'. I actually wanted to honor the rule that refactoring patches should be separate from those introducing the behavior change so we can keep track of things better. The refactoring could have happened on a separate bug I reckon. Yesterday I've finished the patrons one as well. Submitting today (In reply to Tomás Cohen Arazi from comment #6) > (In reply to Joonas Kylmälä from comment #5) > > Instead of making a follow-up to your own commit please squash the 201 > > regression tests to the first patch "Bug 23858: Regression tests" and make > > the fix separate > > Well, it is not a 'fix'. I actually wanted to honor the rule that > refactoring patches should be separate from those introducing the behavior > change so we can keep track of things better. The refactoring could have > happened on a separate bug I reckon. > > Yesterday I've finished the patrons one as well. Submitting today Oh, I misread the patch earlier, I thought it was adding that 201 check as new test but I now see it tested it earlier already for 200 return code. Sorry for this confusion, will sign-off this soon. When trying to apply the patch I get: Applying: Bug 23858: Make POST add the Location header on vendors endpoint error: sha1 information is lacking or useless (Koha/REST/V1/Acquisitions/Vendors.pm). Can you resubmit rebased version? Sorry, I forgot that this was depending on the other bug... Created attachment 94534 [details] [review] Bug 23858: Regression tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Created attachment 94535 [details] [review] Bug 23858: Make POST add the Location header on vendors 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/acquisition_vendors.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: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Created attachment 94536 [details] [review] Bug 23858: (follow-up) Return code fix Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> (In reply to Joonas Kylmälä from comment #4) > Comment on attachment 94481 [details] [review] [review] > Bug 23858: Make POST add the Location header on vendors endpoint > > Review of attachment 94481 [details] [review] [review]: > ----------------------------------------------------------------- > > In the commit message "prove t/db_dependent/api/v1/acquisition_vendors.t" > should be "prove t/db_dependent/api/v1/acquisitions_vendors.t" This was just a minor nitpick and I was easily able to figure it out so I will let it slide this time. Created attachment 94796 [details] [review] Bug 23858: Regression tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Created attachment 94797 [details] [review] Bug 23858: Make POST add the Location header on vendors 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/acquisitions_vendors.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: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Created attachment 94798 [details] [review] Bug 23858: (follow-up) Return code fix Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Nice work! Pushed to master for 19.11.00 |