Koha-clms/t/db_dependent
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
..
Acquisition Bug 27203: Adjust unit tests 2021-05-11 14:46:10 +02:00
Auth Bug 26384: Fix executable flags 2020-09-11 09:56:56 +02:00
AuthoritiesMarc Bug 21958: (QA follow-up) Correct indirect object notation 2021-04-01 17:13:56 +02:00
Authority Bug 26384: Fix executable flags 2020-09-11 09:56:56 +02:00
Biblio Bug 28384: Add 'no_items' option to TransformMarcToKoha 2021-07-16 09:32:12 -04:00
Circulation Bug 28472: (follow-up) add unit test for the case where location = NULL 2021-10-01 13:38:42 -04:00
CourseReserves Bug 26384: Fix executable flags 2020-09-11 09:56:56 +02:00
Creators Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
Exporter Bug 26384: Fix executable flags 2020-09-11 09:56:56 +02:00
Holds Bug 27069: Adjust tests 2021-04-07 16:08:04 +02:00
Illrequest Bug 26384: Fix executable flags 2020-09-11 09:56:56 +02:00
Items Bug 4037: Add item type filter to inventory tool 2021-02-09 09:23:51 +01:00
Koha Bug 31473: Fix fragile test about bad OpacHiddenItems conf 2022-09-08 05:31:38 +02:00
LDAP Bug 21395: (QA follow-up) Remove some introduced issues 2020-06-29 12:37:02 +02:00
Labels Bug 24001: (follow-up) Fix t_Profile.t 2022-06-17 05:25:04 +02:00
Letters Bug 26734: (QA follow-up) Unit tests for C4::Letters 2021-04-27 16:23:49 +02:00
Members Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
OAI Bug 29484: Regression tests 2021-12-17 19:53:32 +00:00
Patron Bug 26937: Add an optional delay to the CheckPrevCheckout syspref. 2021-03-01 15:14:22 +01:00
Record Bug 25898: Fix new occurrences 2020-10-15 13:56:41 +02:00
Reports Bug 30129: Add test 2022-03-07 21:10:55 +00:00
Reserves Bug 26634: Remove GetHoldRule subroutine in C4::Reserves 2020-12-21 10:07:38 +01:00
SIP Bug 29754: (QA follow-up) Minor tests tweaks 2022-02-21 16:52:54 +00:00
Search Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
Serials Bug 26384: Fix executable flags 2020-09-11 09:56:56 +02:00
Template/Plugin Bug 29807: Regression tests 2022-02-16 17:43:24 +00:00
Utils Bug 23271: Replace search_limited with search_with_library_limits 2021-04-21 15:25:07 +02:00
api/v1 Bug 30663: Add x-koha-override options to /suggestions 2022-06-25 04:48:54 +02:00
cronjobs Bug 26384: Fix executable flags 2020-09-11 09:56:56 +02:00
data Bug 27968: Fix framework import if isurl has an incorrect value 2021-04-23 10:03:30 +02:00
misc/translator Bug 25067: Adjust paths in tests 2020-11-06 16:59:40 +01:00
selenium Bug 30595: Prevent update_child_to_adult.t to fail randomly 2022-05-03 20:09:11 +00:00
www Bug 26031: Remove the failing tests and the diag 2020-11-20 08:16:02 +01:00
00-strict.t Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
01-test_dbic.t Bug 26384: Fix executable flags 2020-09-11 09:56:56 +02:00
Accounts.t Bug 27636: (QA follow-up) Unit tests for AutoReconcile 2021-04-30 17:07:31 +02:00
Acquisition.t Bug 23971: Rename pref with AcquisitionLog 2021-04-23 11:58:49 +02:00
Amazon.t
…
ArticleRequests.t Bug 26250: Fix tests when SearchEngine=Elastic 2020-08-31 16:10:26 +02:00
AudioAlerts.t Bug 22001: Remove the RaiseError occurrences from tests 2020-03-27 08:52:56 +00:00
Auth.t Bug 29914: Remove 'Use of uninitialized value ' warnings 2022-01-27 20:34:33 +00:00
AuthUtils.t Bug 26384: (QA follow-up) Fix two exceptions 2020-09-11 09:56:56 +02:00
Auth_with_cas.t Bug 20854: Add more CAS tests 2021-04-21 10:51:29 +02:00
Auth_with_ldap.t Bug 25172: Fix Auth_with_ldap.t 2020-04-22 15:43:16 +01:00
AuthorisedValues.t Bug 28554: Fix t/db_dependent/AuthorisedValues.t 2021-09-03 10:47:08 -04:00
AuthoritiesMarc.t Bug 21958: Fix bibliographic record field comparison with authority 2021-04-01 17:13:56 +02:00
BackgroundJob.t Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
Barcodes.t Bug 26250: Fix tests when SearchEngine=Elastic 2020-08-31 16:10:26 +02:00
Barcodes_ValueBuilder.t Bug 26328: Add test 2022-04-15 18:13:42 +00:00
Biblio.t Bug 28676: Unit test 2021-10-01 13:30:34 -04:00
Breeding.t Bug 29437: (QA follow-up) Update TODO in Breeding.t 2021-11-19 12:02:04 -05:00
Budgets.t Bug 23195: (follow-up) One text invoice should be open 2021-04-22 14:50:11 +02:00
Cache.t Bug 16067: Remove FastMmap 2020-12-04 15:40:58 +01:00
Calendar.t Bug 26384: Fix executable flags 2020-09-11 09:56:56 +02:00
Charset.t Bug 26384: Fix executable flags 2020-09-11 09:56:56 +02:00
Circulation.t Bug 30203: Circulation.t: prevent locking by setting envvar 2022-03-24 17:37:13 +00:00
Clubs.t Bug 29736: (QA follow-up) No need to delete all clubs 2022-01-25 17:53:53 +00:00
Context.t Bug 21395: Make perlcritic happy 2020-06-29 12:37:02 +02:00
Contract.t Bug 26384: Fix executable flags 2020-09-11 09:56:56 +02:00
CourseReserves.t Bug 22001: Remove the RaiseError occurrences from tests 2020-03-27 08:52:56 +00:00
DecreaseLoanHighHolds.t Bug 14866: Make high holds work with different item types 2020-11-06 15:55:17 +01:00
Filter_MARC_ViewPolicy.t Bug 26384: Fix executable flags 2020-09-11 09:56:56 +02:00
Fines.t Bug 26384: Fix executable flags 2020-09-11 09:56:56 +02:00
FrameworkPlugin.t Bug 27461: Add tests for biblio_008 2021-10-08 07:58:02 -04:00
Heading.t Bug 21958: Allow 'e' subfield for authorities 2021-04-06 15:56:30 +02:00
Heading_MARC21.t Bug 24269: Adjust C4::Heading to generate headings from auth tags 2020-02-19 13:33:32 +00:00
Hold.t Bug 21652: Simplify code 2022-02-21 15:16:03 +00:00
Holds.t Bug 29306: Fix warning on undefined $_ in Holds.t 2021-10-29 09:38:51 -04:00
HoldsQueue.t Bug 27069: Adjust tests 2021-04-07 16:08:04 +02:00
Holidays.t Bug 25723: Remove tests for removed method 2020-07-20 17:45:31 +02:00
ILSDI_Services.t Bug 28630: Improve date comparisons in tests 2021-08-06 14:29:17 -04:00
Illcomments.t Bug 26384: Fix executable flags 2020-09-11 09:56:56 +02:00
Illrequestattributes.t Bug 26384: Fix executable flags 2020-09-11 09:56:56 +02:00
Illrequests.t Bug 28932: Regression tests 2022-02-10 16:56:24 +00:00
ImportBatch.t Bug 29838: Fix string interpolation in ImportBatch.t 2022-02-16 20:57:12 +00:00
ImportExportFramework.t Bug 27569: Add tests for ODS export 2021-02-16 10:22:13 +01:00
Installer.t Bug 28281: Add tests 2021-05-07 14:44:00 +02:00
Items.t Bug 27837: Check the MARC directly, not the transformed item 2021-05-19 15:06:42 +02:00
Koha.t Bug 26384: Fix executable flags 2020-09-11 09:56:56 +02:00
Koha_Authority.t
…
Koha_Database.t Bug 26384: Fix executable flags 2020-09-11 09:56:56 +02:00
Koha_Elasticsearch.t Bug 26384: Fix executable flags 2020-09-11 09:56:56 +02:00
Koha_ExternalContent_OverDrive.t Bug 25527: Add logger to Koha::ExternalContent 2020-05-18 15:25:03 +01:00
Koha_ExternalContent_RecordedBooks.t
…
Koha_Misc_Files.t Bug 22001: Remove the RaiseError occurrences from tests 2020-03-27 08:52:56 +00:00
Languages.t
…
Letters.t Bug 30781: Add unit test for substitute with undefined value 2022-06-26 20:07:28 +02:00
LibraryGroups.t Bug 26384: Fix executable flags 2020-09-11 09:56:56 +02:00
Linker_Default.t Bug 24269: Adjust C4::Heading to generate headings from auth tags 2020-02-19 13:33:32 +00:00
Linker_FirstMatch.t Bug 24269: Adjust C4::Heading to generate headings from auth tags 2020-02-19 13:33:32 +00:00
Log.t Bug 26384: Fix executable flags 2020-09-11 09:56:56 +02:00
MarcModificationTemplates.t Bug 26894: Handle subfield 0 and delete empty fields 2021-01-12 16:02:35 +01:00
Members.t Bug 28943: Lower the risk of accidental patron deletion 2022-04-15 16:45:21 +00:00
Message.t Bug 28230: Regression tests 2021-04-28 11:07:05 +02:00
MungeMarcPrice.t
…
NewsChannels.t Bug 26384: Fix executable flags 2020-09-11 09:56:56 +02:00
Overdues.t Bug 28144: Add a regression test 2021-04-27 16:23:49 +02:00
Passwordrecovery.t Bug 22343: (follow-up) Remove traces of Mail::Sendmail 2020-10-05 11:15:51 +02:00
PatronLists.t
…
Patroncards.t
…
Patrons.t Bug 27554: Clarify and add tests for update_category_to 2021-02-01 16:21:25 +01:00
Record.t Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
RecordProcessor_EmbedSeeFromHeadings.t Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
Reports.t
…
Reserves.t Bug 29553: Regression tests 2022-01-21 17:37:31 +00:00
RotatingCollections.t Bug 17202: Unit tests 2021-04-28 11:07:06 +02:00
Search.t Bug 30153: (QA follow-up) Fix unit tests 2022-03-20 15:03:59 +00:00
Serials.t Revert "Bug 30035: Fix month name in prediction pattern" 2022-07-14 21:40:19 +02:00
Serials_2.t Bug 26384: Fix executable flags 2020-09-11 09:56:56 +02:00
Service.t
…
ShelfBrowser.t Bug 26384: Fix executable flags 2020-09-11 09:56:56 +02:00
Sitemapper.t Bug 24840: Replace DateTime->now with dt_from_string 2020-04-08 11:54:23 +01:00
Stats.t Bug 26384: Fix executable flags 2020-09-11 09:56:56 +02:00
StockRotationItems.t Bug 30518: Unit test 2022-05-03 19:51:01 +00:00
StockRotationRotas.t Bug 26384: Fix executable flags 2020-09-11 09:56:56 +02:00
StockRotationStages.t Bug 29809: Fix StockRotationStages.t 2022-02-21 15:43:52 +00:00
SuggestionEngine_ExplodedTerms.t Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
Suggestions.t Bug 28855: (follow-up) adapt specific test 2021-12-17 21:05:34 +00:00
TablesSettings.t Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
Tags.t
…
Templates.t Bug 28303: Add unit test for badtemplatecheck 2021-10-08 10:24:49 -04:00
TestBuilder.t Bug 29862: Add missing txn begin/rollback in TestBuilder.t 2022-02-21 15:38:46 +00:00
Upload.t Bug 28123: Fix expected value in unit test 2021-04-16 12:28:18 +02:00
UsageStats.t Bug 28108: Fix filtering 2021-05-10 15:52:53 +02:00
Virtualshelves.t Bug 26384: Fix executable flags 2020-09-11 09:56:56 +02:00
XISBN.t Bug 28288: Prevent XSISBN.t to fail if service is returning 500 2021-05-04 16:38:27 +02:00
XSLT.t Bug 28299: Unit tests for buildKohaItemsNamespace 2021-07-09 13:48:57 -04:00
check_kohastructure.t Bug 26384: Fix executable flags 2020-09-11 09:56:56 +02:00
check_sysprefs.t Bug 23895: Fix check_sysprefs.t 2020-10-14 15:52:29 +02:00
db_structure.t Bug 26384: Fix executable flags 2020-09-11 09:56:56 +02:00
rollingloans.t Bug 26384: Fix executable flags 2020-09-11 09:56:56 +02:00
sysprefs.t Bug 22880: (follow-up) Loose ends: Better DB update, global inclusion, etc. 2020-02-24 13:24:25 +00:00
yaml.t Bug 22824: Adjust tests to match final behaviours 2021-03-04 16:18:42 +01:00
zebra_config.pl Bug 24735: Remove QueryParser-related code 2020-03-02 11:13:03 +00:00