From 9a687caae4042c379fff4b37ca3774c47b02669b Mon Sep 17 00:00:00 2001 From: Aseem Bansal Date: Sat, 5 Nov 2022 03:08:51 +0530 Subject: [PATCH] feat(build): env variable for creds pass to cypress (#6367) --- smoke-test/smoke.sh | 3 +++ smoke-test/tests/cypress/cypress/support/commands.js | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/smoke-test/smoke.sh b/smoke-test/smoke.sh index 6b0a337485..033fcfd82c 100755 --- a/smoke-test/smoke.sh +++ b/smoke-test/smoke.sh @@ -27,4 +27,7 @@ DATAHUB_TELEMETRY_ENABLED=false datahub docker quickstart --standalone_consumers (cd ..; ./gradlew :smoke-test:yarnInstall) +export CYPRESS_ADMIN_USERNAME=${ADMIN_USERNAME:-datahub} +export CYPRESS_ADMIN_PASSWORD=${ADMIN_PASSWORD:-datahub} + pytest -rP --durations=20 -vv --continue-on-collection-errors --junit-xml=junit.smoke.xml diff --git a/smoke-test/tests/cypress/cypress/support/commands.js b/smoke-test/tests/cypress/cypress/support/commands.js index 9a36f2cb35..87229b5bab 100644 --- a/smoke-test/tests/cypress/cypress/support/commands.js +++ b/smoke-test/tests/cypress/cypress/support/commands.js @@ -15,8 +15,8 @@ Cypress.Commands.add('login', () => { method: 'POST', url: '/logIn', body: { - username: 'datahub', - password: 'datahub', + username: Cypress.env('ADMIN_USERNAME'), + password: Cypress.env('ADMIN_PASSWORD'), }, retryOnStatusCodeFailure: true, });