[Bug 43071] New: Test failures when Holds Allowed (daily) has a value
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43071 Bug ID: 43071 Summary: Test failures when Holds Allowed (daily) has a value Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Test Suite Assignee: chris@bigballofwax.co.nz Reporter: andrew@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org Target Milestone: --- t/db_dependent/Holds.t, t/db_dependent/ILSDI_Services.t, and t/db_dependent/api/v1/holds.t all fail if the Holds Allowed (daily) circ rule has a value. They fail slightly differently for a non-zero value and for a zero. They pass if there is no value set for this rule. Non-zero: Test Summary Report ------------------- t/db_dependent/Holds.t (Wstat: 512 (exited 2) Tests: 74 Failed: 2) Failed tests: 64, 69 Non-zero exit status: 2 t/db_dependent/ILSDI_Services.t (Wstat: 256 (exited 1) Tests: 16 Failed: 1) Failed test: 6 Non-zero exit status: 1 t/db_dependent/api/v1/holds.t (Wstat: 2816 (exited 11) Tests: 12 Failed: 1) Failed test: 11 Non-zero exit status: 11 Parse errors: Bad plan. You planned 20 tests but ran 12. Zero: Test Summary Report ------------------- t/db_dependent/Holds.t (Wstat: 1024 (exited 4) Tests: 74 Failed: 4) Failed tests: 64-66, 69 Non-zero exit status: 4 t/db_dependent/ILSDI_Services.t (Wstat: 512 (exited 2) Tests: 8 Failed: 2) Failed tests: 6-7 Non-zero exit status: 2 Parse errors: Bad plan. You planned 16 tests but ran 8. t/db_dependent/api/v1/holds.t (Wstat: 2816 (exited 11) Tests: 12 Failed: 1) Failed test: 11 Non-zero exit status: 11 Parse errors: Bad plan. You planned 20 tests but ran 12 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43071 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |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=43071 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|chris@bigballofwax.co.nz |martin.renvoize@openfifth.c | |o.uk CC| |martin.renvoize@openfifth.c | |o.uk -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43071 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |42558 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42558 [Bug 42558] reserves.reservedate should be datetime instead of date -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43071 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Sponsorship status|--- |Unsponsored Patch complexity|--- |Trivial patch 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=43071 --- Comment #1 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 202333 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202333&action=edit Bug 43071: Isolate holds_per_day-sensitive tests from ambient circulation rules t/db_dependent/Holds.t, t/db_dependent/ILSDI_Services.t, and t/db_dependent/api/v1/holds.t all fail if a site has a global 'Holds Allowed (Daily)' circulation rule configured, because C4::Reserves::CanItemBeReserved checks holds_per_day before holds_per_record/reservesallowed, so an ambient daily-cap rule returns tooManyReservesToday and masks the status these tests actually exercise (tooManyReserves, noReservesAllowed, OK, or the API's hold_limit override). The affected subtests never set holds_per_day themselves, so they unintentionally depend on the database having no such rule configured. Test plan: 1. On a fresh db, set a global 'Holds Allowed (Daily)' circulation rule (Administration > Circulation and fine rules) to 1. 2. prove t/db_dependent/Holds.t t/db_dependent/ILSDI_Services.t t/db_dependent/api/v1/holds.t => fails before this patch, passes after. 3. Remove the circulation rule and re-run the same tests. => still passes (no regression for the default/unconfigured case). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43071 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|42558 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42558 [Bug 42558] reserves.reservedate should be datetime instead of date -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43071 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=43071 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #202333|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43071 --- Comment #2 from David Nind <david@davidnind.com> --- Created attachment 202380 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202380&action=edit Bug 43071: Isolate holds_per_day-sensitive tests from ambient circulation rules t/db_dependent/Holds.t, t/db_dependent/ILSDI_Services.t, and t/db_dependent/api/v1/holds.t all fail if a site has a global 'Holds Allowed (Daily)' circulation rule configured, because C4::Reserves::CanItemBeReserved checks holds_per_day before holds_per_record/reservesallowed, so an ambient daily-cap rule returns tooManyReservesToday and masks the status these tests actually exercise (tooManyReserves, noReservesAllowed, OK, or the API's hold_limit override). The affected subtests never set holds_per_day themselves, so they unintentionally depend on the database having no such rule configured. Test plan: 1. On a fresh db, set a global 'Holds Allowed (Daily)' circulation rule (Administration > Circulation and fine rules) to 1. 2. prove t/db_dependent/Holds.t t/db_dependent/ILSDI_Services.t t/db_dependent/api/v1/holds.t => fails before this patch, passes after. 3. Remove the circulation rule and re-run the same tests. => still passes (no regression for the default/unconfigured case). 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=43071 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |andrew@bywatersolutions.com |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43071 Andrew Fuerste-Henry <andrew@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=43071 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #202380|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43071 --- Comment #3 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 202406 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202406&action=edit Bug 43071: Isolate holds_per_day-sensitive tests from ambient circulation rules t/db_dependent/Holds.t, t/db_dependent/ILSDI_Services.t, and t/db_dependent/api/v1/holds.t all fail if a site has a global 'Holds Allowed (Daily)' circulation rule configured, because C4::Reserves::CanItemBeReserved checks holds_per_day before holds_per_record/reservesallowed, so an ambient daily-cap rule returns tooManyReservesToday and masks the status these tests actually exercise (tooManyReserves, noReservesAllowed, OK, or the API's hold_limit override). The affected subtests never set holds_per_day themselves, so they unintentionally depend on the database having no such rule configured. Test plan: 1. On a fresh db, set a global 'Holds Allowed (Daily)' circulation rule (Administration > Circulation and fine rules) to 1. 2. prove t/db_dependent/Holds.t t/db_dependent/ILSDI_Services.t t/db_dependent/api/v1/holds.t => fails before this patch, passes after. 3. Remove the circulation rule and re-run the same tests. => still passes (no regression for the default/unconfigured case). Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43071 Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |26.11.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43071 --- Comment #4 from Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> --- Thanks everyone! Pushed to main for 26.11! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43071 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|26.11.00 |26.11.00,26.05.03 released in| | Status|Pushed to main |Pushed to stable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43071 --- Comment #5 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to 26.05.x for the upcoming 26.05.03 release. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org