It's hardcoded to work with ktd, but it should be more flexible const connectionConfig = { host: "db", user: "koha_kohadev", password: "password", database: "koha_kohadev", };
This should work: const connectionConfig = { host: process.env.DB_HOSTNAME || "db", user: process.env.DB_USER || "koha_kohadev", password: process.env.DB_PASSWORD || "password", database: process.env.DB_NAME || "koha_kohadev", };
Created attachment 190160 [details] [review] Bug 40446: Allow overriding Cypress DB settings Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Changed assignee. Sorry, have no idea how to test this one.
Created attachment 190921 [details] [review] Bug 40446: Allow overriding Cypress DB settings Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io> Amended-by: Jonathan Druart tidy Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
To test I've checked that the 4 env vars were defined in ktd, then adjusted them add made sure the test (eg. t/cypress/integration/t/db.ts) then failed $ env|grep DB_ DB_PASSWORD=password DB_HOSTNAME=db DB_USER=koha_kohadev DB_NAME=xkoha_kohadev
Nice work everyone! Pushed to main for 26.05
All pushed to 25.11.x Thanks all!