Koha-clms/t/db_dependent/Koha
Tomas Cohen Arazi f3b83357ba 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>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-09-08 05:31:38 +02:00
..
Account Bug 29785: Rename Koha::Object->message with ->object_messages 2022-02-21 16:35:20 +00:00
Acquisition Bug 29785: Rename Koha::Object->message with ->object_messages 2022-02-21 16:35:20 +00:00
Biblio
…
BiblioUtils Bug 29625: Add test for get_all_biblios_iterator 2022-03-07 20:56:05 +00:00
Cash Bug 26274: (QA follow-up) Minor fixes 2021-02-12 12:33:41 +01:00
Charges
…
Checkouts Bug 29495: Unit Tests 2022-02-17 19:47:01 +00:00
Club Bug 27333: Regression tests 2021-01-27 10:45:54 +01:00
Config Bug 27154: Fix test if the cache is populated already 2021-02-09 09:21:31 +01:00
Edifact Bug 29670: Unit tests 2022-02-10 15:43:12 +00:00
Filter Bug 30848: Add exec flag to test 2022-08-15 22:31:46 +02:00
IssuingRules
…
Item Bug 24434: Add Unit Tests for relations 2021-06-18 10:37:17 -04:00
Library
…
Objects/Mixin
…
Patron Bug 28220: Deal with merge 2021-05-17 12:29:23 +02:00
Patrons Bug 28220: UI changes 2021-05-17 12:29:24 +02:00
Plugins Bug 30072: (follow-up) Silence useless warning 2022-03-07 19:57:35 +00:00
REST Bug 29506: Regression tests 2022-01-11 21:48:21 +00:00
SMTP Bug 29427: Regression tests 2021-12-17 13:08:14 +00:00
SearchEngine Bug 25669: (follow-up) Minor fixes 2022-08-26 22:30:57 +02:00
Subscription
…
Tags
…
Template/Plugin Bug 28802: Fix Asset.t 2021-08-20 12:34:54 -04:00
XSLT
…
Z3950Responder Bug 26057: (QA follow-up) Fix Biblios, Reserves, Z3950Responder and XSLT tests 2021-03-04 09:49:30 +01:00
Account.t Bug 29139: Add regression tests 2021-10-08 09:51:58 -04:00
ActionLogs.t
…
ApiKey.t Bug 28772: Make validate_secret return 1|0 2021-09-15 10:47:12 -04:00
Authorities.t
…
BackgroundJobs.t Bug 27317: (Bug 27127 follow-up) fix t/db_dependent/Koha/BackgroundJobs.t 2020-12-30 12:05:12 -03:00
Biblio.t Bug 18989: (QA follow-up) Make Koha::Biblio->hidden_in_opac aware of OpacHiddenItemsHidesRecord 2021-05-12 14:12:07 +02:00
BiblioFrameworks.t
…
Biblios.t Bug 29172: Make CustomCoverImagesURL compatible with control fields 2021-10-22 09:51:37 -04:00
Checkout.t
…
Checkouts.t Bug 23207: Regression tests 2021-04-22 14:37:14 +02:00
CirculationRules.t Bug 23091: Update unit test 2020-11-06 15:55:17 +01:00
Cities.t
…
ClassSortRules.t
…
ClassSources.t
…
ClassSplitRules.t
…
CoverImages.t
…
CsvProfiles.t
…
Database.t
…
Desks.t
…
Hold.t Bug 29804: Regression tests 2022-02-10 20:49:41 +00:00
Holds.t Bug 29786: Unit tests 2022-02-10 20:40:36 +00:00
IssuingRules.t Bug 23091: Update unit test 2020-11-06 15:55:17 +01:00
Item.t Bug 29958: Regression tests 2022-08-17 23:43:43 +02:00
ItemTypes.t Bug 27491: Rename system preference opaclanguages to OPACLanguages 2021-01-22 14:59:27 +01:00
Items.t Bug 31473: Fix fragile test about bad OpacHiddenItems conf 2022-09-08 05:31:38 +02:00
KeyboardShortcuts.t
…
Libraries.t Bug 28581: Add 'from_email_address' method and use in Koha::Patron 2021-07-09 09:05:48 -04:00
Library.t Bug 26595: Embed the whole smtp_server object 2020-10-14 15:53:38 +02:00
MarcSubfieldStructures.t
…
News.t Bug 27714: Prevent Koha::NewsItem->author to explode 2021-02-23 13:12:56 +01:00
Notices.t
…
Object.t Bug 29785: Rename Koha::Object->message with ->object_messages 2022-02-21 16:35:20 +00:00
Objects.t Bug 21549: Make filter_by_last_update returns a Koha::Objects-based object 2021-04-14 15:34:27 +02:00
Old.t
…
Patron.t Bug 31005: Unit test 2022-07-14 21:40:22 +02:00
Patrons.t Bug 28873: Fix age displayed in db_dependent/Koha/Patrons.t 2021-08-20 13:48:31 -04:00
Pseudonymization.t
…
Quotes.t
…
Ratings.t
…
Reports.t Bug 24695: Move to Koha::Report->is_sql_valid 2021-04-12 15:27:50 +02:00
Reviews.t
…
SMS_Providers.t
…
SearchField.t Bug 19482: (follow-up) Fix update, add tests, restore closing </td> 2020-11-04 12:59:33 +01:00
SharedContent.t
…
Statistics.t
…
Subscription.t
…
Suggestion.t
…
Suggestions.t Bug 30663: Add Koha::Suggestions helper methods 2022-06-25 04:45:09 +02:00
Tags.t
…
Z3950Servers.t
…