Koha-clms/t/db_dependent
Tomás Cohen Arazi 417ac6fb03
Bug 42719: [26.05.x] Add regression tests
Add tests for the OAuth/OIDC login endpoint covering:
- IdP-initiated flow (no CGISESSID cookie on initial request)
- Callback without CGISESSID cookie (session lost)
- Normal SP-initiated flow (cookie present)

Tests create a real identity provider in the database and assert:
- Initial request without cookie redirects to the IdP authorize URL
- A CGISESSID cookie is set for the new session
- Callback without cookie returns wrong_csrf_token error (not 500)
- Normal flow with cookie redirects to IdP as expected

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4d7869ccb1155cda2be2f0b09933528de2dd9a85)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-09-25 09:42:14 -06:00
..
Acquisition Bug 42749: Prevent SQL injection from GetInvoices (order_by) 2026-08-10 08:18:08 -06:00
Auth Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
AuthoritiesMarc Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Authority Bug 40577: Bulk biblio ES index update after auth change 2026-04-15 14:10:14 -06:00
Biblio Bug 42764: Fix spelling errors across the codebase 2026-06-11 09:53:34 -06:00
Budgets Bug 38944: Manual changes 2025-03-13 17:25:04 +01:00
Circulation Bug 42764: Fix spelling errors across the codebase 2026-06-11 09:53:34 -06:00
CourseReserves Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
Creators Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
Exporter Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
Holds Bug 40058: Adjust existing tests 2025-08-14 16:06:00 -06:00
HoldsQueue Bug 43033: Sort unallocated task indices before compacting the retry matrix 2026-08-10 14:56:39 -06:00
Items Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
Koha Bug 43088: Add a consistent current_directory() accessor to Koha::File::Transport 2026-09-14 14:21:42 -06:00
LDAP Bug 39325: Manual fixes 2025-04-28 18:51:23 +02:00
Labels Bug 40680: Fix t tests 2025-12-01 08:34:01 -07:00
Letters Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
Members Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
OAI Bug 40962: Apply ViewPolicy filter consistently in OAI Server test setup 2026-03-23 07:54:05 +01:00
Patron Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
Record Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
Reports Bug 42359: Fix Guided.t update_sql test input 2026-04-23 09:24:59 -06:00
Reserves Bug 41983: (QA follow-up): Rebuild the holds queue when groups are edited 2026-05-06 15:20:58 -06:00
SIP Bug 42847: (QA follow-up) Clear session state on all login_core exit paths 2026-08-10 08:18:07 -06:00
Search Bug 40680: Fix t tests 2025-12-01 08:34:01 -07:00
Serials Bug 37796: (QA follow-up) nextpublisheddate in t/db../GetNextSeq.t 2025-12-17 13:24:24 -07:00
Template/Plugin Bug 39781: (RM follow-up) Fix wrong mock_userenv key in test 2026-03-26 09:32:23 +01:00
Utils Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
api/v1 Bug 42719: [26.05.x] Add regression tests 2026-09-25 09:42:14 -06:00
cronjobs Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
data Bug 39345: (QA follow-up): Add exception handling for unsupported counter release 2025-09-05 15:10:31 -06:00
misc/translator Bug 41216: (follow-up) Fix path to sample.tt in xgettext-tt2.t 2026-04-13 09:52:55 +01:00
mojo Bug 39055: Add change to Koha::App::Plugin::CSRF and fix unit test 2026-03-19 10:51:41 +00:00
selenium Bug 41604: (follow-up) Wait for the page to be ready before searching in patrons_search.t 2026-08-10 15:52:38 -06:00
www Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
00-strict.t Bug 42937: Remove unneeded flag in 00-strict.t 2026-08-10 15:52:44 -06:00
Accounts.t Bug 35612: (QA follow-up) Add test for undefined LostChargesControl preference 2026-02-27 11:38:54 -07:00
Acquisition.t Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
Amazon.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
ArticleRequests.t Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
AudioAlerts.t Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
Auth.t Bug 40286: Make C4::Auth::checkpw_internal use Koha::Patrons->find_by_identifier 2026-03-23 08:01:01 +01:00
AuthUtils.t Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
Auth_with_cas.t Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
Auth_with_ldap.t Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
Auth_with_shibboleth.t Bug 41076: Adjust our perl tidiness for v20250105 2026-02-05 09:03:51 -07:00
AuthorisedValues.t Bug 40444: Add a test to ensure all Perl test files use Test::NoWarnings 2025-07-28 16:26:36 -06:00
AuthoritiesMarc.t Bug 42032: (follow-up) Eliminate phantom indicator diffs on authority MODIFY 2026-05-05 13:42:06 -06:00
AuthoritiesMarc_GetTagsLabels.t Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
Barcodes.t Bug 40680: Fix t tests 2025-12-01 08:34:01 -07:00
Barcodes_ValueBuilder.t Bug 42221: Fix EAN-13 autoBarcode not incrementing 2026-04-16 15:54:09 -06:00
Biblio.t Bug 42188: (follow-up) Update ModBiblio test for new info format 2026-05-06 09:52:11 -06:00
Biblio_holdsqueue.t Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
Breeding.t Bug 40680: Fix t tests 2025-12-01 08:34:01 -07:00
Breeding_Auth.t Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
Budgets.t Bug 40371: Remove warnings from Budgets.t output 2025-07-23 16:36:30 -06:00
Cache.t Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
Calendar.t Bug 42545: (RM follow-up) Tidy test file 2026-05-20 09:04:54 -06:00
Charset.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Circulation.t Bug 42396: Remove C4::Stats::UpdateStats and delete module 2026-09-14 09:08:29 -06:00
ClassSources.t Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
Clubs.t Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
Context.t Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
Contract.t Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
CourseReserves.t Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
DecreaseLoanHighHolds.t Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
Filter_MARC_ViewPolicy.t Bug 41076: Adjust our perl tidiness for v20250105 2026-02-05 09:03:51 -07:00
Fines.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
FrameworkPlugin.t Bug 38365: Require a non-empty nonce in FrameworkPlugin.t 2026-03-17 09:38:49 +01:00
Heading.t Bug 42764: Fix spelling errors across the codebase 2026-06-11 09:53:34 -06:00
Heading_MARC21.t Bug 40680: Fix t tests 2025-12-01 08:34:01 -07:00
Hold.t Bug 41076: Adjust our perl tidiness for v20250105 2026-02-05 09:03:51 -07:00
Holds.t Bug 43071: Isolate holds_per_day-sensitive tests from ambient circulation rules 2026-08-13 08:53:24 -06:00
HoldsQueue.t Bug 40680: Fix C4::Calendar imports 2025-12-01 08:34:00 -07:00
Holidays.t Bug 40680: Fix t tests 2025-12-01 08:34:01 -07:00
ILSDI_Services.t Bug 43071: Isolate holds_per_day-sensitive tests from ambient circulation rules 2026-08-13 08:53:24 -06:00
ImportBatch.t Bug 42098: (follow-up) Enable plugin in ImportBatch.t test 2026-03-20 07:51:01 +00:00
ImportExportFramework.t Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
Installer.t Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
Items.t Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
Koha.t Bug 35729: Normalize ISBNs as ISBN-13 if cannot fallback to ISBN-10 2026-09-14 09:08:33 -06:00
Koha_Database.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Koha_Elasticsearch.t Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
Koha_ExternalContent_OverDrive.t Bug 38944: Manual changes 2025-03-13 17:25:04 +01:00
Koha_MetadataRecord_Authority.t Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
Koha_Misc_Files.t Bug 42764: Fix spelling errors across the codebase 2026-06-11 09:53:34 -06:00
Languages.t Bug 41440: (QA follow-up) Add unit tests 2026-04-15 14:10:32 -06:00
Letters.t Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
LibraryGroups.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Linker_Default.t Bug 40680: Fix t tests 2025-12-01 08:34:01 -07:00
Linker_FirstMatch.t Bug 40680: Fix t tests 2025-12-01 08:34:01 -07:00
Log.t Bug 20956: BorrowersLog is not logging permission changes 2026-03-23 10:41:51 +01:00
MarcModificationTemplates.t Bug 16994: (QA follow-up) Align overwrite result key across module, template and tests 2026-04-17 09:18:17 -06:00
Matcher.t Bug 42764: Fix spelling errors across the codebase 2026-06-11 09:53:34 -06:00
Members.t Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
Message.t Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
MungeMarcPrice.t Bug 38944: Manual changes 2025-03-13 17:25:04 +01:00
Output.t Bug 38936: Use https in license 2025-10-01 08:32:49 -06:00
Overdues.t Bug 35612: Add tests for branch context recording in OVERDUE fees 2026-02-27 11:38:50 -07:00
Passwordrecovery.t Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
PatronLists.t Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
Patroncards.t Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
Patrons.t Bug 41076: Adjust our perl tidiness for v20250105 2026-02-05 09:03:51 -07:00
Prices.t Bug 39325: Automatic fix 2025-04-28 18:51:22 +02:00
Realtime_holdsqueue.t Bug 40680: Fix t tests 2025-12-01 08:34:01 -07:00
Record.t Bug 41690: (follow-up) Add test 2026-05-01 11:04:35 -06:00
RecordProcessor_EmbedSeeFromHeadings.t Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
Reports.t Bug 39325: Automatic fix 2025-04-28 18:51:22 +02:00
Reserves.t Bug 41358: Apply consistent JSON logging to holds (Bug 40866) 2026-08-10 14:56:42 -06:00
RotatingCollections.t Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
Search.t Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
Search_FacetSorting.t Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
Serials.t Bug 37796: Pass correct publication date when generating the next serial form the serial collection page 2025-12-17 13:24:17 -07:00
Serials_2.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Service.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
ShelfBrowser.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Sitemapper.t Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
SocialData.t Bug 41076: Adjust our perl tidiness for v20250105 2026-02-05 09:03:51 -07:00
StockRotationItems.t Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
StockRotationRotas.t Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
StockRotationStages.t Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
SuggestionEngine_ExplodedTerms.t Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
Suggestions.t Bug 42645: Add tests for FallbackToSMSIfNoEmail with alternate email fields 2026-07-13 16:10:31 -06:00
TablesSettings.t Bug 41042: default_save_state is enabled by default 2025-10-23 11:33:32 -06:00
Tags.t Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
Templates.t Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
TestBuilder.t Bug 41076: Adjust our perl tidiness for v20250105 2026-02-05 09:03:51 -07:00
Upload.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
UsageStats.t Bug 42764: Fix spelling errors across the codebase 2026-06-11 09:53:34 -06:00
Virtualshelves.t Bug 18148: Add unit tests 2025-11-05 07:12:35 -07:00
XISBN.t Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
XSLT.t Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
check_kohastructure.t Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
check_sysprefs.t Bug 42734: Add autoMemberNumValue to patrons sysprefs UI with caution note 2026-07-09 13:06:39 -06:00
db_structure.t Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
rollingloans.t Bug 40680: Fix t tests 2025-12-01 08:34:01 -07:00
sysprefs.t Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
yaml.t Bug 38944: Manual changes 2025-03-13 17:25:04 +01:00
zebra_config.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00