Summary: | Test for GET /api/v1/cash_registers/:cash_register_id/cashups is fragile | ||
---|---|---|---|
Product: | Koha | Reporter: | Tomás Cohen Arazi (tcohen) <tomascohen> |
Component: | REST API | Assignee: | Tomás Cohen Arazi (tcohen) <tomascohen> |
Status: | Pushed to oldstable --- | QA Contact: | Marcel de Rooy <m.de.rooy> |
Severity: | normal | ||
Priority: | P5 - low | CC: | david, fridolin.somers, lucas, m.de.rooy, tomascohen |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
24.05.00,23.11.06,23.05.12
|
|
Circulation function: | |||
Bug Depends on: | 26274 | ||
Bug Blocks: | |||
Attachments: |
Bug 36493: Make cashups test more robust
Bug 36493: Make cashups test more robust Bug 36493: Make cashups test more robust |
Description
Tomás Cohen Arazi (tcohen)
2024-04-02 15:36:55 UTC
Created attachment 164285 [details] [review] 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> Created attachment 164288 [details] [review] 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> 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"; Created attachment 164788 [details] [review] 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> Pushed for 24.05! Well done everyone, thank you! Pushed to 23.11.x for 23.11.06 Backported to 23.05.x for upcoming 23.05.12 |