[Bug 36493] New: Test for GET /api/v1/cash_registers/:cash_register_id/cashups is fragile
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36493 Bug ID: 36493 Summary: Test for GET /api/v1/cash_registers/:cash_register_id/cashups is fragile Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: REST API Assignee: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com CC: tomascohen@gmail.com This test fails if Koha has a cash register defined already, with ID=1. To reproduce: 1. Fire up a fresh KTD 2. Add a cash register (needs UseCashRegisters enabled) 3. Run: $ ktd --shell k$ prove t/db_dependent/api/v1/cashups.t => FAIL: Expecting a 404 ("Register not found"), getting a 200. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36493 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |normal Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36493 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |26274 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26274 [Bug 26274] Expose cash register cashup summaries via an API route. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36493 Tomás Cohen Arazi <tomascohen@gmail.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=36493 --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 164285 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=164285&action=edit Bug 36493: Make cashups test more robust This patch makes the test independent from existing cash registers in the system. To test: 1. Enable UseCashRegisters on a fresh KTD 2. Add a cash register 3. Run: $ ktd --shell k$ prove t/db_dependent/api/v1/cashups.t => FAIL: Tests fail! 4. Apply this patch 5. Repeat 3 => SUCCESS: Tests pass! 6. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36493 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=36493 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #164285|0 |1 is obsolete| | --- Comment #2 from David Nind <david@davidnind.com> --- Created attachment 164288 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=164288&action=edit Bug 36493: Make cashups test more robust This patch makes the test independent from existing cash registers in the system. To test: 1. Enable UseCashRegisters on a fresh KTD 2. Add a cash register 3. Run: $ ktd --shell k$ prove t/db_dependent/api/v1/cashups.t => FAIL: Tests fail! 4. Apply this patch 5. Repeat 3 => SUCCESS: Tests pass! 6. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> 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=36493 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #3 from David Nind <david@davidnind.com> --- Testing notes (using KTD): 1. The first cash register created doesn't always have an ID of 1. 2. I had to update the database manually to have one with an ID of 1: - Access the database: koha-mysql kohadev - Get a list of cash registers: select * from cash_registers; - Update the cash register ID (XXXXX = the name of the cash register from the first query): update cash_registers set id=1 where name="XXXXX"; -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36493 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch 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=36493 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #164288|0 |1 is obsolete| | --- Comment #4 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 164788 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=164788&action=edit Bug 36493: Make cashups test more robust This patch makes the test independent from existing cash registers in the system. To test: 1. Enable UseCashRegisters on a fresh KTD 2. Add a cash register 3. Run: $ ktd --shell k$ prove t/db_dependent/api/v1/cashups.t => FAIL: Tests fail! 4. Apply this patch 5. Repeat 3 => SUCCESS: Tests pass! 6. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36493 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact| |m.de.rooy@rijksmuseum.nl CC| |m.de.rooy@rijksmuseum.nl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36493 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |24.05.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36493 --- Comment #5 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=36493 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|24.05.00 |24.05.00,23.11.06 released in| | CC| |fridolin.somers@biblibre.co | |m Status|Pushed to main |Pushed to stable --- Comment #6 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 23.11.x for 23.11.06 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36493 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|24.05.00,23.11.06 |24.05.00,23.11.06,23.05.12 released in| | CC| |lucas@bywatersolutions.com Status|Pushed to stable |Pushed to oldstable --- Comment #7 from Lucas Gass <lucas@bywatersolutions.com> --- Backported to 23.05.x for upcoming 23.05.12 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36493 Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to oldstable |RESOLVED Resolution|--- |FIXED CC| |wainuiwitikapark@catalyst.n | |et.nz --- Comment #8 from Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> --- Not backporting to 22.11 unless requested -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org