[Bug 21613] New: Turn strict SQL mode on for tests
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21613 Bug ID: 21613 Summary: Turn strict SQL mode on for tests Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: ASSIGNED Severity: normal Priority: P5 - low Component: Test Suite Assignee: jonathan.druart@bugs.koha-community.org Reporter: jonathan.druart@bugs.koha-community.org QA Contact: testopia@bugs.koha-community.org In order to make sure developers will be aware of possible regressions we should turn the strict SQL mode on for tests. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21613 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |21597 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21597 [Bug 21597] Test suite is still failing with new default SQL modes -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21613 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21613 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 80887 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=80887&action=edit Bug 21613: Add a test -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21613 --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 80888 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=80888&action=edit Bug 21613: Turn strict SQL modes on for tests This patch will turn the strict SQL modes on When tests are ran with prove. Test plan: - Apply the first patch - prove t/db_dependent/Koha/Database.t => Will pass if you have <strict_sql_modes>1</strict_sql_modes> in your koha-conf.xml => Will fail otherwise - Apply the second patch - prove t/db_dependent/Koha/Database.t => Will pass whatever the value of strict_sql_modes in your koha-conf.xml -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21613 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Turn strict SQL mode on for |Turn strict SQL modes on |tests |for tests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21613 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com, | |nick@bywatersolutions.com, | |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21613 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21613 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #80887|0 |1 is obsolete| | --- Comment #3 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 80896 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=80896&action=edit Bug 21613: Add a test Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21613 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #80888|0 |1 is obsolete| | --- Comment #4 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 80897 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=80897&action=edit Bug 21613: Turn strict SQL modes on for tests This patch will turn the strict SQL modes on When tests are ran with prove. Test plan: - Apply the first patch - prove t/db_dependent/Koha/Database.t => Will pass if you have <strict_sql_modes>1</strict_sql_modes> in your koha-conf.xml => Will fail otherwise - Apply the second patch - prove t/db_dependent/Koha/Database.t => Will pass whatever the value of strict_sql_modes in your koha-conf.xml Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21613 --- Comment #5 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 80904 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=80904&action=edit Bug 21613: (QA follow-up) Resolve warning on $ENV{_} Some shells may not pass the program name in underscore, and cron also does not like it here: Use of uninitialized value $ENV{"_"} in pattern match (m//) at Koha/Database.pm line 79. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21613 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #80904|0 |1 is obsolete| | --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 80936 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=80936&action=edit Bug 21613: (QA follow-up) Resolve warning on $ENV{_} Some shells may not pass the program name in underscore, and cron also does not like it here: Use of uninitialized value $ENV{"_"} in pattern match (m//) at Koha/Database.pm line 79. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21613 --- Comment #7 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 80937 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=80937&action=edit Bug 21613: (QA follow-up) Resolve warning on $ENV{_} - avoid autovivification See C4::Circulation::SendCirculationAlert 3355 my $do_not_lock = ( exists $ENV{_} && $ENV{_} =~ m|prove| ) || $ENV{KOHA_NO_TABLE_LOCKS}; Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21613 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21613 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #80896|0 |1 is obsolete| | --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 81387 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=81387&action=edit Bug 21613: Add a test Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21613 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #80897|0 |1 is obsolete| | --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 81388 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=81388&action=edit Bug 21613: Turn strict SQL modes on for tests This patch will turn the strict SQL modes on When tests are ran with prove. Test plan: - Apply the first patch - prove t/db_dependent/Koha/Database.t => Will pass if you have <strict_sql_modes>1</strict_sql_modes> in your koha-conf.xml => Will fail otherwise - Apply the second patch - prove t/db_dependent/Koha/Database.t => Will pass whatever the value of strict_sql_modes in your koha-conf.xml Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21613 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #80936|0 |1 is obsolete| | --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 81389 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=81389&action=edit Bug 21613: (QA follow-up) Resolve warning on $ENV{_} Some shells may not pass the program name in underscore, and cron also does not like it here: Use of uninitialized value $ENV{"_"} in pattern match (m//) at Koha/Database.pm line 79. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21613 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #80937|0 |1 is obsolete| | --- Comment #11 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 81390 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=81390&action=edit Bug 21613: (QA follow-up) Resolve warning on $ENV{_} - avoid autovivification See C4::Circulation::SendCirculationAlert 3355 my $do_not_lock = ( exists $ENV{_} && $ENV{_} =~ m|prove| ) || $ENV{KOHA_NO_TABLE_LOCKS}; Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21613 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #12 from Nick Clemens <nick@bywatersolutions.com> --- Awesome work all! Pushed to master for 18.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21613 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |21717 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21717 [Bug 21717] TestBuilder.t is failing randomly -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21613 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Pushed to Master |RESOLVED --- Comment #13 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- I'm backporting allot of the sql fixes, but some are not trivial. As such I'm holding off on backporting this trigger whilst I ponder the worthwhileness of backporting the less trivial cases. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21613 Bug 21613 depends on bug 21597, which changed state. Bug 21597 Summary: Test suite is still failing with new default SQL modes https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21597 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Stable |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org