Bugzilla – Attachment 190920 Details for
Bug 41362
Allow Cypress tests to use KOHA_USER and KOHA_PASS as override
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41362: Allow Cypress tests to use KOHA_USER and KOHA_PASS as override
63364c2.patch (text/plain), 1.94 KB, created by
Jonathan Druart
on 2026-01-06 09:38:35 UTC
(
hide
)
Description:
Bug 41362: Allow Cypress tests to use KOHA_USER and KOHA_PASS as override
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2026-01-06 09:38:35 UTC
Size:
1.94 KB
patch
obsolete
>From 63364c2704bb4688018a7f2292d0b19e8febee01 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Tom=C3=A1s=20Cohen=20Arazi?= <tomascohen@theke.io> >Date: Wed, 3 Dec 2025 10:46:09 -0300 >Subject: [PATCH] Bug 41362: Allow Cypress tests to use KOHA_USER and KOHA_PASS > as override >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >The cypress.config.ts file had hardcoded API credentials (koha:koha) >which don't work in KTD environments that use different credentials. > >This patch makes the config use KOHA_USER and KOHA_PASS environment >variables if set, falling back to koha:koha if not. > >Test plan: >1. On a running KTD, run the cypress tests: > $ ktd --shell > k$ run_cypress >=> SUCCESS: Tests are run, no errors about credentials >2. Edit your KTD .env file, so KOHA_USER=tcohen, KOHA_PASS=tomasito >3. Shut your kTD down, and start a fresh one >4. Repeat 1 >=> SUCCESS: The command shows `cypress run --env KOHA_USER=tcohen,KOHA_PASS=tomasito` is run. >=> FAIL: Some tests fail right away with invalid credentials error >5. Apply this patch >6. Repeat 1 >=> SUCCESS: Same command as 4 >=> SUCCESS: Tests don't fail for credentials >7. Sign off :-D > >Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io> >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > cypress.config.ts | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/cypress.config.ts b/cypress.config.ts >index e8a4bf5ca90..47e7ca5fffe 100644 >--- a/cypress.config.ts >+++ b/cypress.config.ts >@@ -18,8 +18,8 @@ export default defineConfig({ > supportFile: "t/cypress/support/e2e.js", > env: { > opacBaseUrl: process.env.KOHA_OPAC_URL || "http://localhost:8080", >- apiUsername: "koha", >- apiPassword: "koha", >+ apiUsername: process.env.KOHA_USER || "koha", >+ apiPassword: process.env.KOHA_PASS || "koha", > }, > }, > >-- >2.43.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 41362
:
190116
|
190144
| 190920