It can be tempting to remove all records from a table or just set one column to NULL in a whole table to get a test working quickly. But we should better avoid that, or replace it by something less drastic (if reasonably possible). An example from Members.t: $dbh->do(q|UPDATE borrowers SET lastseen=NULL|); Surely you should not run such tests on a production db. But when someone forgets a rollback here or there, you might have some troubled data on your test system, and often needless. Note that I still often see test branches or item types appear in my test data after spending some time on a test db with master (running some tests).
Created attachment 156954 [details] [review] Bug 35042: Remove set datelastseen to null on table in Members.t Non-trivial was adding the category_type <> S. Test plan: Run t/db_dependent/Members.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Just run the test! Switching to SO
Created attachment 157153 [details] [review] Bug 35042: Remove set datelastseen to null on table in Members.t Non-trivial was adding the category_type <> S. Test plan: Run t/db_dependent/Members.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Pushed to master for 23.11. Nice work everyone, thanks!
Pushed to 23.05.x for 23.05.05
Nice work everyone! Pushed to oldstable for 22.11.x