Description
Matt Blenkinsop
2024-01-10 10:12:55 UTC
Created attachment 160745 [details] [review] Bug 35757: Add new fields to api definitions The counter registry API has added a new field to both the counter registry and sushi service endpoints. This patch adds those new fields to the definitions. Created attachment 160746 [details] [review] Bug 35757: Fix unit tests for external counter registry API This patch updates the unit tests for the external counter registry API used in the Usage Statistics module. The intent of the tests is to identify any changes in the external response that could lead to errors in Koha. To do this, the tests now compare the list of hask keys returned in the response with the current definition in Koha, and identifies any new fields that need to be added to the definition. Test plan: prove t/db_dependent/api/v1/erm_counter_registries.t prove t/db_dependent/api/v1/erm_sushi_services.t Created attachment 160747 [details] [review] Bug 35757: Fix unit tests for external counter registry API This patch updates the unit tests for the external counter registry API used in the Usage Statistics module. The intent of the tests is to identify any changes in the external response that could lead to errors in Koha. To do this, the tests now compare the list of hash keys returned in the response with the current definition in Koha, and identifies any new fields that need to be added to the definition. Test plan: prove t/db_dependent/api/v1/erm_counter_registries.t prove t/db_dependent/api/v1/erm_sushi_services.t Created attachment 160748 [details] [review] Bug 35757: Add new fields to api definitions The counter registry API has added a new field to both the counter registry and sushi service endpoints. This patch adds those new fields to the definitions. Signed-off-by: David Nind <david@davidnind.com> Created attachment 160749 [details] [review] Bug 35757: Fix unit tests for external counter registry API This patch updates the unit tests for the external counter registry API used in the Usage Statistics module. The intent of the tests is to identify any changes in the external response that could lead to errors in Koha. To do this, the tests now compare the list of hash keys returned in the response with the current definition in Koha, and identifies any new fields that need to be added to the definition. Test plan: prove t/db_dependent/api/v1/erm_counter_registries.t prove t/db_dependent/api/v1/erm_sushi_services.t Signed-off-by: David Nind <david@davidnind.com> Created attachment 160779 [details] [review] Bug 35757: Add new fields to api definitions The counter registry API has added a new field to both the counter registry and sushi service endpoints. This patch adds those new fields to the definitions. Signed-off-by: David Nind <david@davidnind.com> Created attachment 160780 [details] [review] Bug 35757: Fix unit tests for external counter registry API This patch updates the unit tests for the external counter registry API used in the Usage Statistics module. The intent of the tests is to identify any changes in the external response that could lead to errors in Koha. To do this, the tests now compare the list of hash keys returned in the response with the current definition in Koha, and identifies any new fields that need to be added to the definition. Test plan: prove t/db_dependent/api/v1/erm_counter_registries.t prove t/db_dependent/api/v1/erm_sushi_services.t Signed-off-by: David Nind <david@davidnind.com> Created attachment 160781 [details] [review] Bug 35757: (QA follow-up) Tidy 1. Can this kind of failure be anticipated? Should we watch sushi's repo to catch such changes in advance? 2. Shouldn't you adjust cy.getCounterRegistryProvider (t/cypress/support/e2e.js) as well? (In reply to Jonathan Druart from comment #9) > 1. Can this kind of failure be anticipated? Should we watch sushi's repo to > catch such changes in advance? The repo isn't public so we can't watch this. The idea of the test is to watch for changes to the API and alert us to any new fields that have been added. > 2. Shouldn't you adjust cy.getCounterRegistryProvider > (t/cypress/support/e2e.js) as well? The cypress test is just a mock for the fields that we actually use so isn't dependent on the API. I can update it but the tests shouldn't fail as a result of this Pushed for 24.05! Well done everyone, thank you! Pushed to 23.11.x for 23.11.02 Not needed in 23.05.x, no backport. |