[Bug 34126] New: Tests in t/db_dependent/Koha/Patron.t fail due broken FK constraint
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34126 Bug ID: 34126 Summary: Tests in t/db_dependent/Koha/Patron.t fail due broken FK constraint Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Test Suite Assignee: chris@bigballofwax.co.nz Reporter: emmi.takkinen@koha-suomi.fi QA Contact: testopia@bugs.koha-community.org Koha/Patron.t tests fail when apparently when patron should be deleted after paying accountlines: t/db_dependent/Koha/Patron.t .. 10/24 DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Cannot add or update a child row: a foreign key constraint fails (`koha_kv`.`accountlines`, CONSTRAINT `accountlines_ibfk_borrowers_2` FOREIGN KEY (`manager_id`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE CASCADE) at /home/emmi/Koha/Koha/Object.pm line 170 # Looks like you planned 14 tests but ran 12. # Failed test 'safe_to_delete() tests' # at t/db_dependent/Koha/Patron.t line 1124. Broken FK constraint# Looks like your test exited with 255 just after 14. t/db_dependent/Koha/Patron.t .. Dubious, test returned 255 (wstat 65280, 0xff00) Failed 11/24 subtests Test Summary Report ------------------- t/db_dependent/Koha/Patron.t (Wstat: 65280 Tests: 14 Failed: 1) Failed test: 14 Non-zero exit status: 255 Parse errors: Bad plan. You planned 24 tests but ran 14. Files=1, Tests=14, 8 wallclock secs ( 0.05 usr 0.00 sys + 7.20 cusr 0.57 csys = 7.82 CPU) Result: FAIL -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34126 --- Comment #1 from Emmi Takkinen <emmi.takkinen@koha-suomi.fi> --- It's actually this line which fails: $patron->account->pay({ amount => 10, debits => [ $debit ] }); -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34126 Emmi Takkinen <emmi.takkinen@koha-suomi.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|chris@bigballofwax.co.nz |emmi.takkinen@koha-suomi.fi Status|NEW |Needs Signoff --- Comment #2 from Emmi Takkinen <emmi.takkinen@koha-suomi.fi> --- Created attachment 152705 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152705&action=edit Bug 34126: Mock userenv in safe_to_delete() tests Koha/Patron.t tests failed due broken FK constraint error. Mocking userenv fixes this. To test prove t/db_dependent/Koha/Patron.t. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34126 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pedro.amorim@ptfs-europe.co | |m Status|Needs Signoff |RESOLVED Resolution|--- |WORKSFORME --- Comment #3 from Pedro Amorim <pedro.amorim@ptfs-europe.com> --- I'm sorry, I can't reproduce this on master. prove t/db_dependent/Koha/Patron.t All tests are passing for me. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org