It currently explodes with something like: DBIC result _type isn't of the _type Subscription at t/db_dependent/Biblio.t line 627.
Created attachment 96179 [details] [review] Bug 24213: Add tests
Created attachment 96180 [details] [review] Bug 24213: Fix Koha::Object->get_from_storage if the object has been deleted Without this patch it fails with something like: DBIC result _type isn't of the _type Subscription at t/db_dependent/Biblio.t line 627. Test plan: - Apply the first patch (Add tests) - Confirm that they fail - Apply this patch - Confirm that the tests pass
Created attachment 98175 [details] [review] Bug 24213: Add tests Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 98176 [details] [review] Bug 24213: Fix Koha::Object->get_from_storage if the object has been deleted Without this patch it fails with something like: DBIC result _type isn't of the _type Subscription at t/db_dependent/Biblio.t line 627. Test plan: - Apply the first patch (Add tests) - Confirm that they fail - Apply this patch - Confirm that the tests pass Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Works as expected and makes sense.. Signing off.
QAing
# Subtest: Bad value tests 1..3 # No tests run! not ok 16 - No tests run for subtest "Bad value tests" # Failed test 'No tests run for subtest "Bad value tests"' # at t/db_dependent/Koha/Object.t line 685. # Looks like you failed 1 test of 16. not ok 16 - store() tests # Failed test 'store() tests' # at t/db_dependent/Koha/Object.t line 688. Stumbling across this fail, but also without your patch.
(In reply to Marcel de Rooy from comment #7) > # Subtest: Bad value tests > 1..3 > # No tests run! > not ok 16 - No tests run for subtest "Bad value tests" > # Failed test 'No tests run for subtest "Bad value tests"' > # at t/db_dependent/Koha/Object.t line 685. > # Looks like you failed 1 test of 16. > not ok 16 - store() tests > # Failed test 'store() tests' > # at t/db_dependent/Koha/Object.t line 688. > > Stumbling across this fail, but also without your patch. Can be ignored. Resolved with strict_sql_mode. Maybe an idea to put this key in the default koha-conf.xml (commented or zero)?
Created attachment 98203 [details] [review] Bug 24213: Add tests Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 98204 [details] [review] Bug 24213: Fix Koha::Object->get_from_storage if the object has been deleted Without this patch it fails with something like: DBIC result _type isn't of the _type Subscription at t/db_dependent/Biblio.t line 627. Test plan: - Apply the first patch (Add tests) - Confirm that they fail - Apply this patch - Confirm that the tests pass Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
(In reply to Marcel de Rooy from comment #8) > (In reply to Marcel de Rooy from comment #7) > > # Subtest: Bad value tests > > 1..3 > > # No tests run! > > not ok 16 - No tests run for subtest "Bad value tests" > > # Failed test 'No tests run for subtest "Bad value tests"' > > # at t/db_dependent/Koha/Object.t line 685. > > # Looks like you failed 1 test of 16. > > not ok 16 - store() tests > > # Failed test 'store() tests' > > # at t/db_dependent/Koha/Object.t line 688. > > > > Stumbling across this fail, but also without your patch. > > Can be ignored. Resolved with strict_sql_mode. Maybe an idea to put this key > in the default koha-conf.xml (commented or zero)? I do not understand what you meant. The test passes for me, with strict_sql_mode set. When run with prove, the strict mode is enabled automatically. Also the flag is set for devs (so from koha-testing-docker), that's is expected, we want devs to catch such problems.
Nice work everyone! Pushed to master for 20.05
Pushed to 19.11.x branch for 19.11.03
backported to 19.05.x for 19.05.08
Backported to 18.11.x for 18.11.14.