]> git.koha-community.org Git - koha.git/commit
Bug 32898: Avoid hardcoding user/pass in tests
authorTomas Cohen Arazi <tomascohen@theke.io>
Mon, 20 Feb 2023 14:07:44 +0000 (11:07 -0300)
committerJacob O'Mara <jacob.omara@ptfs-europe.com>
Fri, 24 Feb 2023 10:59:48 +0000 (10:59 +0000)
commit996527b28e9c11db61d02550fa6b5fc924c994fc
treec135e12089a0a3978f3895d0d7a4c89bb65eef91
parent63721132f7b5abb16ba15fd9eb6387eb640ba706
Bug 32898: Avoid hardcoding user/pass in tests

This patch makes the authentication parameters be configurable through
env. Before this, it was hardcoded to koha/koha, which only works if the
ktd defaults haven't been tweaked.

If no env is defined, it fallsback to koha/koha.

In order to pass the ktd configured params, the tests need to be run
like:

$ yarn cypress run --env KOHA_USER=$KOHA_USER,KOHA_PASS=$KOHA_PASS

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 53bebb413aec3796ce66311b0e66c872e01fee19)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
t/cypress/integration/Agreements_spec.ts
t/cypress/integration/Licenses_spec.ts
t/cypress/integration/Packages_spec.ts
t/cypress/integration/Titles_spec.ts
t/cypress/support/commands.js