https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36765 Bug ID: 36765 Summary: TestBuilder should explode if FK broken Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org Right now, it only warns and continues. While this might mean 'there already exists a resource with the value we need for the test', this is really hiding a design issue with the tests. For example ```perl my $library = $builde->build_object( { class => 'Koha::Libraries, value => { branchcode => 'ILL', pickup_location => 1 } } ); ``` might fail because 'ILL' already exists, but if the DB entry doesn't contain the other fixed condition (pickup_location=1) then the tests could fail weirdly, and tracking it would be harder (i.e. you read the code, see you are setting pickup_location=1, but it fails because it is not). I propose we make it explode loudly instead. And fix the poorly written tests that explode because of it. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.