Created attachment 170947 [details] [review] Bug 37810: Consider ServiceActive on status response Some SUSHI providers return ServiceActive instead of the documented Service_Active: https://countermetrics.stoplight.io/docs/counter-sushi-api/f0dd30f814944-server-status This ensures the test connection does not fail regardless of what is used
Created attachment 171717 [details] [review] Bug 37810: Add test Test plan: 1) Apply only tests patch, run: prove t/db_dependent/Koha/ERM/EUsage/UsageDataProvider.t 2) Verify tests fail 3) Apply fix patch 4) Run tests again, verify they pass
Created attachment 171718 [details] [review] Bug 37810: Consider ServiceActive on status response Some SUSHI providers return ServiceActive instead of the documented Service_Active: https://countermetrics.stoplight.io/docs/counter-sushi-api/f0dd30f814944-server-status This ensures the test connection does not fail regardless of what is used
Adding 24.05 and 23.11 release candidate keywords as this improves how the SUSHI response is handled widening the pool of providers Koha is able to work with.
The tests fail with both patches applied: prove t/db_dependent/Koha/ERM/EUsage/UsageDataProvider.t t/db_dependent/Koha/ERM/EUsage/UsageDataProvider.t .. # Failed test at t/db_dependent/Koha/ERM/EUsage/UsageDataProvider.t line 72. # got: 'https://service_url.com/reports/tr_j1?customer_id=ID123&requestor_id=REQID123&api_key=APIKEY&begin_date=2023-08&end_date=2023-09&platform=emPARhPJsVEGAhPhc67LuGhjn5jCFc11a8x_mK0D3tWSVz3ike8PjaPj0baZfYtyVoJEEoob5qzY2' # expected: 'https://service_url.com/reports/tr_j1?customer_id=ID123&requestor_id=REQID123&api_key=APIKEY&begin_date=2023-08&end_date=2023-09' # Looks like you failed 1 test of 1. t/db_dependent/Koha/ERM/EUsage/UsageDataProvider.t .. 1/2 # Failed test '_build_url_query' # at t/db_dependent/Koha/ERM/EUsage/UsageDataProvider.t line 77. # Looks like you failed 1 test of 2. t/db_dependent/Koha/ERM/EUsage/UsageDataProvider.t .. Dubious, test returned 1 (wstat 256, 0x100) Failed 1/2 subtests Test Summary Report ------------------- t/db_dependent/Koha/ERM/EUsage/UsageDataProvider.t (Wstat: 256 (exited 1) Tests: 2 Failed: 1) Failed test: 1 Non-zero exit status: 1 Files=1, Tests=2, 1 wallclock secs ( 0.02 usr 0.01 sys + 0.93 cusr 0.18 csys = 1.14 CPU) Result: FAIL
Hi David, thank you. I believe you may need to pull latest main as it appears you're missing the last 2 follow-up patches from bug 37856 that fix those test errors. The test error seems to be the one fixed by those patches, are you able to confirm please? i.e. make sure main is up to date and test again. Happy to look again in case I'm mistaken. Thanks!
Created attachment 172198 [details] [review] Bug 37810: Add test Test plan: 1) Apply only tests patch, run: prove t/db_dependent/Koha/ERM/EUsage/UsageDataProvider.t 2) Verify tests fail 3) Apply fix patch 4) Run tests again, verify they pass Signed-off-by: David Nind <david@davidnind.com>
Created attachment 172199 [details] [review] Bug 37810: Consider ServiceActive on status response Some SUSHI providers return ServiceActive instead of the documented Service_Active: https://countermetrics.stoplight.io/docs/counter-sushi-api/f0dd30f814944-server-status This ensures the test connection does not fail regardless of what is used Signed-off-by: David Nind <david@davidnind.com>
(In reply to Pedro Amorim from comment #6) > Hi David, thank you. > I believe you may need to pull latest main as it appears you're missing the > last 2 follow-up patches from bug 37856 that fix those test errors. > The test error seems to be the one fixed by those patches, are you able to > confirm please? i.e. make sure main is up to date and test again. > Happy to look again in case I'm mistaken. Thanks! Things are working now, so this must have been the case. Now signed off.
Created attachment 172272 [details] [review] Bug 37810: Add test Test plan: 1) Apply only tests patch, run: prove t/db_dependent/Koha/ERM/EUsage/UsageDataProvider.t 2) Verify tests fail 3) Apply fix patch 4) Run tests again, verify they pass Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 172273 [details] [review] Bug 37810: Consider ServiceActive on status response Some SUSHI providers return ServiceActive instead of the documented Service_Active: https://countermetrics.stoplight.io/docs/counter-sushi-api/f0dd30f814944-server-status This ensures the test connection does not fail regardless of what is used Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 172274 [details] [review] Bug 37810: (QA follow-up) Tidy Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Thanks for all the hard work! Pushed to main for the next 24.11.00 release as RM Assistant