Bug 20906 - Fix Debian 9 Test Failures
Summary: Fix Debian 9 Test Failures
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: Main
Hardware: All Linux
: P4 major (vote)
Assignee: Martin Renvoize
QA Contact: Tomás Cohen Arazi
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-08 11:49 UTC by Martin Renvoize
Modified: 2019-10-14 19:57 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 20906: Prevent test failures due to precision changes (1.48 KB, patch)
2018-06-08 11:58 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 20906: Prevent test failures due to stricter perl (1.04 KB, patch)
2018-06-08 13:34 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 20906: Prevent test failures due to precision changes (2) (5.11 KB, patch)
2018-06-08 14:21 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 20906: Fix translatable-templates.t (2.29 KB, patch)
2018-06-08 16:11 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 20906: Prevent test failures due to precision changes (1.54 KB, patch)
2018-06-19 14:34 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 20906: Prevent test failures due to stricter perl (1.10 KB, patch)
2018-06-19 14:34 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 20906: Prevent test failures due to precision changes (2) (5.17 KB, patch)
2018-06-19 14:34 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 20906: Fix translatable-templates.t (2.34 KB, patch)
2018-06-19 14:34 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Renvoize 2018-06-08 11:49:49 UTC
On upgrade from Debian 8 to Debian 9 the resultant DBI driver update alters the returned precision for numeric values.

This causes some of the test suit to start failing.
Comment 1 Martin Renvoize 2018-06-08 11:58:02 UTC
Created attachment 75916 [details] [review]
Bug 20906: Prevent test failures due to precision changes
Comment 2 Martin Renvoize 2018-06-08 13:06:56 UTC
On upgrade from Debian 8 to Debian 9 the resultant Perl update means perl strict is 'more strict' ;)
Comment 3 Martin Renvoize 2018-06-08 13:34:04 UTC
Created attachment 75920 [details] [review]
Bug 20906: Prevent test failures due to stricter perl
Comment 4 Martin Renvoize 2018-06-08 14:21:53 UTC
Created attachment 75921 [details] [review]
Bug 20906: Prevent test failures due to precision changes (2)
Comment 5 Martin Renvoize 2018-06-08 14:23:18 UTC
I'm not proud of that last one.. it fixes the tests but I'd rather convert the float for discount in the database to a decimal to match the decimal that's used for tax_rate (which is also a percentage measured to the same accuracy.. seems odd to have them stored differently).. but that seemed over the top here.
Comment 6 Martin Renvoize 2018-06-08 14:24:57 UTC
Test plan.. run the affected tests against both D8 and D9 and see that they now pass ;)

Beware, running 00_strict requires WebService::ILS::OverDrive is installed.. KohaDevBox is missing it in my experience.
Comment 7 Jonathan Druart 2018-06-08 16:11:07 UTC
Created attachment 75929 [details] [review]
Bug 20906: Fix translatable-templates.t

From Jenkins:
koha_1       | #   Failed test 'staff_prog templates are translatable'
koha_1       | #   at xt/author/translatable-templates.t line 87.
koha_1       | # Can't locate TmplTokenizer.pm in @INC (you may need to install the TmplTokenizer module) (@INC contains: /kohadevbox/koha /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.24.1 /usr/local/share/perl/5.24.1 /usr/lib/x86_64-linux-gnu/perl5/5.24 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.24 /usr/share/perl/5.24 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at ./tmpl_process3.pl line 20.

On Stretch, '.' is not longer added to @INC, see bug 17717 for more info
Comment 8 Jonathan Druart 2018-06-12 13:35:10 UTC
Upping severity, we need it pushed ASAP
Comment 9 Tomás Cohen Arazi 2018-06-19 14:34:18 UTC
Created attachment 76175 [details] [review]
Bug 20906: Prevent test failures due to precision changes

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 10 Tomás Cohen Arazi 2018-06-19 14:34:25 UTC
Created attachment 76176 [details] [review]
Bug 20906: Prevent test failures due to stricter perl

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 11 Tomás Cohen Arazi 2018-06-19 14:34:32 UTC
Created attachment 76177 [details] [review]
Bug 20906: Prevent test failures due to precision changes (2)

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 12 Tomás Cohen Arazi 2018-06-19 14:34:40 UTC
Created attachment 76178 [details] [review]
Bug 20906: Fix translatable-templates.t

From Jenkins:
koha_1       | #   Failed test 'staff_prog templates are translatable'
koha_1       | #   at xt/author/translatable-templates.t line 87.
koha_1       | # Can't locate TmplTokenizer.pm in @INC (you may need to install the TmplTokenizer module) (@INC contains: /kohadevbox/koha /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.24.1 /usr/local/share/perl/5.24.1 /usr/lib/x86_64-linux-gnu/perl5/5.24 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.24 /usr/share/perl/5.24 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at ./tmpl_process3.pl line 20.

On Stretch, '.' is not longer added to @INC, see bug 17717 for more info

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 13 Tomás Cohen Arazi 2018-06-19 15:16:12 UTC
This is simple enough to skip other QA step. It was written by two QA team members...
Comment 14 Nick Clemens 2018-06-22 13:49:39 UTC
Awesome work all!

Pushed to master for 18.11.x
Comment 15 Martin Renvoize 2018-06-25 17:10:10 UTC
Pushed to 18.05.x for 18.05.02
Comment 16 Fridolin Somers 2018-06-28 05:48:49 UTC
Pushed to 17.11.x, will be in v17.11.08
Comment 17 Fridolin Somers 2018-07-26 08:04:00 UTC
No need of Debian 9 compatibility for 17.05.x