https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18086 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #58 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Thanks for the fixes :) --- In the test plan, after updatedatabase, it's missing to run `dbic` (refresh schema). Without that, the ORM is out of sync with the DB so your changes are not effective in the objects. Here, the FK should create relationships between libraries and an overdue rules. ---- (In reply to Baptiste Wojtkowski (bwoj) from comment #41)
(In reply to Victor Grousset/tuxayo from comment #39)
Are there other tests relevant to run than t/db_dependent/Overdues.t ? Because a coverage analysis[1] shows that GetBranchcodesWithOverdueRules and GetOverdueMessageTransportTypes aren't executed during Overdues.t.
[1] https://wiki.koha-community.org/wiki/ Coding_Guidelines#PERL17%3A_Unit_tests_are_required
Hi ! I don't get your point, tests 4-12 are supposed to test GetOverdueMessageTransportTypes and 13-17 are testing GetBranchcodesWithOverdueRules, am I missing something ?
I wanted to double check running the tests with Devel::Cover: `perl -MDevel::Cover t/db_dependent/Overdues.t ; cover` But the new patches fail running them. (even after refreshing the schema files) kohadev-koha@kohadevbox:koha(testing-SO-QA)$ prove t/db_dependent/Overdues.t t/db_dependent/Overdues.t .. 1/18 {UNKNOWN}: DBI Exception: DBD::mysql::db do failed: Cannot delete or update a parent row: a foreign key constraint fails (`koha_kohadev`.`borrowers`, CONSTRAINT `borrowers_ibfk_2` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`)) at /usr/share/perl5/DBIx/Class/Schema.pm line 1118. DBIx::Class::Schema::throw_exception(Koha::Schema=HASH(0x5b316b2d71c0), "DBI Exception: DBD::mysql::db do failed: Cannot delete or upd"...) called at /usr/share/perl5/DBIx/Class/Storage.pm line 113 DBIx::Class::Storage::throw_exception(DBIx::Class::Storage::DBI::mysql=HASH(0x5b3173104ba8), "DBI Exception: DBD::mysql::db do failed: Cannot delete or upd"...) called at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1501 DBIx::Class::Storage::DBI::__ANON__("DBD::mysql::db do failed: Cannot delete or update a parent ro"..., DBI::db=HASH(0x5b31757496b0), undef) called at t/db_dependent/Overdues.t line 29 # Looks like your test exited with 11 just after 3. t/db_dependent/Overdues.t .. Dubious, test returned 11 (wstat 2816, 0xb00) Failed 15/18 subtests Test Summary Report ------------------- t/db_dependent/Overdues.t (Wstat: 2816 Tests: 3 Failed: 0) Non-zero exit status: 11 Parse errors: Bad plan. You planned 18 tests but ran 3. Files=1, Tests=3, 3 wallclock secs ( 0.04 usr 0.00 sys + 2.43 cusr 0.23 csys = 2.70 CPU) Result: FAIL -- You are receiving this mail because: You are watching all bug changes.