]> git.koha-community.org Git - koha.git/commit
Bug 31557: (QA follow-up) Make tests more robust
authorTomas Cohen Arazi <tomascohen@theke.io>
Fri, 12 May 2023 14:11:44 +0000 (11:11 -0300)
committerTomas Cohen Arazi <tomascohen@theke.io>
Fri, 12 May 2023 14:22:48 +0000 (11:22 -0300)
commit519844611d9abd92ffad305344657204f013d445
treee79c36070a4a5ca613f44338f76745cbb9239c9d
parente84ae9b7208244ac5eb2f5fe8dcf4ccaa4eaa94d
Bug 31557: (QA follow-up) Make tests more robust

Tests had a few problems:

- They weren't wrapped in a transaction explicitly
- They called Koha::Biblios->delete!
- They failed if run a couple times

This patch:

- Wraps things in a transaction
- Removes not-required things ($target_rs variable not used)
- Preserves the tests logic, but filters the resultset on the
  biblionumber instead of deleting all the database which can fail
  depending on FK constraints.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
t/db_dependent/HoldsQueue.t