From 5b92279a56119990a515d67a93742968be58a9e0 Mon Sep 17 00:00:00 2001 From: pjarugula Date: Mon, 29 Jan 2024 23:04:20 +0530 Subject: [PATCH 1/3] refactor: Read values from synthetic secrets --- .../onboarding-tests/roles/configure/tasks/main.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/test/deploy/onboarding-tests/roles/configure/tasks/main.yml b/test/deploy/onboarding-tests/roles/configure/tasks/main.yml index 77837eba9..9045913c9 100755 --- a/test/deploy/onboarding-tests/roles/configure/tasks/main.yml +++ b/test/deploy/onboarding-tests/roles/configure/tasks/main.yml @@ -2,6 +2,14 @@ - debug: msg: Tests E2E +- name: Set test account email from Synthetic secrets + set_fact: + test_email: {{ test_email }} + +- name: Set test account password from Synthetic secrets + set_fact: + test_password: {{ test_password }} + - name: Create directory shell: "mkdir -p ~/tests && chmod 777 ~/tests" @@ -18,7 +26,7 @@ - name: Store values in env file shell: | - echo "ENV_SECRET_EMAIL='example@newrelic.com' \nENV_SECRET_PASSWORD='example'" >> ~/tests/onboarding-e2e-tests/.env + echo "ENV_SECRET_EMAIL='{{ test_email }}' \nENV_SECRET_PASSWORD='{{test_password }}'" >> ~/tests/onboarding-e2e-tests/.env - name: Write Permissions for repo shell: "chmod 755 ~/tests/onboarding-e2e-tests" From ab11b73f0c67ded2f2d6685a12a183df76b140c0 Mon Sep 17 00:00:00 2001 From: pjarugula Date: Tue, 30 Jan 2024 13:07:17 +0530 Subject: [PATCH 2/3] refactor: Add line to run tests --- test/deploy/onboarding-tests/roles/configure/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/deploy/onboarding-tests/roles/configure/tasks/main.yml b/test/deploy/onboarding-tests/roles/configure/tasks/main.yml index 9045913c9..ab4e0b46c 100755 --- a/test/deploy/onboarding-tests/roles/configure/tasks/main.yml +++ b/test/deploy/onboarding-tests/roles/configure/tasks/main.yml @@ -42,6 +42,6 @@ chdir: ~/tests/onboarding-e2e-tests - name: Test playwright scripts - shell: "npx playwright test" + shell: "npx playwright test --config=playwright.config.validations.js" args: chdir: ~/tests/onboarding-e2e-tests From 702632f7c20f6297256e15ce53f333d4870cc61e Mon Sep 17 00:00:00 2001 From: pjarugula Date: Tue, 30 Jan 2024 13:10:40 +0530 Subject: [PATCH 3/3] refactor: Add line to run tests --- test/deploy/onboarding-tests/roles/configure/tasks/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/deploy/onboarding-tests/roles/configure/tasks/main.yml b/test/deploy/onboarding-tests/roles/configure/tasks/main.yml index ab4e0b46c..7a8892c84 100755 --- a/test/deploy/onboarding-tests/roles/configure/tasks/main.yml +++ b/test/deploy/onboarding-tests/roles/configure/tasks/main.yml @@ -4,11 +4,11 @@ - name: Set test account email from Synthetic secrets set_fact: - test_email: {{ test_email }} + test_email: "{{ test_email }}" - name: Set test account password from Synthetic secrets set_fact: - test_password: {{ test_password }} + test_password: "{{ test_password }}" - name: Create directory shell: "mkdir -p ~/tests && chmod 777 ~/tests"