]> git.koha-community.org Git - koha.git/commit
Bug 31473: Fix fragile test about bad OpacHiddenItems conf
authorTomas Cohen Arazi <tomascohen@theke.io>
Fri, 26 Aug 2022 19:45:10 +0000 (16:45 -0300)
committerArthur Suzuki <arthur.suzuki@biblibre.com>
Wed, 12 Oct 2022 15:20:46 +0000 (17:20 +0200)
commit89cfa3f37bd6c68f6813bf6334a15fbe668e359e
tree60aac51ceec8cca9c1635158ad7e5f7aa8b9ef17
parentdd4deaadfc2c2f89b275701f7c3a6d73247ef4cc
Bug 31473: Fix fragile test about bad OpacHiddenItems conf

There's been a behavior change in recent MariaDB that made some cases
deal with truncated data in DOUBLE context instead of DECIMAL.

Probably this:
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-27380

This made the affected test fail consistently on those versions.

This trick for checking OpacHiddenItems is correct (as introduced on bug
28125 doesn't really make use of the warning, just prints it in
about.pl) so one option was to just check for a warning.

I decided to keep the test, but add the optional DECIMAL|DOUBLE check on
the qr. This way other eventual changes will make it fail and serve as a
warning in case something more relevant changes.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ t/db_dependent/Koha/Items.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3a5fb22ad88790673d6d8fbc483f6e219f25f33d)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit aebaf2495b4abc2a4d7c32db531f78feaa8df98e)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
t/db_dependent/Koha/Items.t