[Bug 35757] New: Sushi service and counter registry tests are failing
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35757 Bug ID: 35757 Summary: Sushi service and counter registry tests are failing Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: ERM Assignee: jonathan.druart+koha@gmail.com Reporter: matt.blenkinsop@ptfs-europe.com CC: jonathan.druart+koha@gmail.com, jonathan.field@ptfs-europe.com, martin.renvoize@ptfs-europe.com, matt.blenkinsop@ptfs-europe.com, pedro.amorim@ptfs-europe.com The tests for the sushi service and counter registry endpoints are failing. Currently they are based on comparing an expected response with an actual response which is not ideal. This bug is to re-write the tests to just check the field names that are being returned by the external API so identify any changes to the API that could affect functionality in Koha. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35757 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|jonathan.druart+koha@gmail. |matt.blenkinsop@ptfs-europe |com |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35757 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35757 --- Comment #1 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Created attachment 160745 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=160745&action=edit 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. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35757 --- Comment #2 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Created attachment 160746 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=160746&action=edit 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 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35757 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #160746|0 |1 is obsolete| | --- Comment #3 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Created attachment 160747 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=160747&action=edit 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 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35757 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35757 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #160745|0 |1 is obsolete| | --- Comment #4 from David Nind <david@davidnind.com> --- Created attachment 160748 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=160748&action=edit 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> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35757 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #160747|0 |1 is obsolete| | --- Comment #5 from David Nind <david@davidnind.com> --- Created attachment 160749 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=160749&action=edit 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> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35757 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35757 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #160748|0 |1 is obsolete| | --- Comment #6 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 160779 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=160779&action=edit 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> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35757 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #160749|0 |1 is obsolete| | --- Comment #7 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 160780 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=160780&action=edit 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> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35757 --- Comment #8 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 160781 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=160781&action=edit Bug 35757: (QA follow-up) Tidy -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35757 --- Comment #9 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- 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? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35757 --- Comment #10 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- (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 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35757 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |24.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35757 --- Comment #11 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 24.05! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35757 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Version(s)|24.05.00 |24.05.00,23.11.02 released in| | Status|Pushed to master |Pushed to stable --- Comment #12 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 23.11.x for 23.11.02 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35757 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |RESOLVED Resolution|--- |FIXED CC| |lucas@bywatersolutions.com --- Comment #13 from Lucas Gass <lucas@bywatersolutions.com> --- Not needed in 23.05.x, no backport. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org