From 25cc74f7c10b8047fcb4fbd72cb656247f150dd1 Mon Sep 17 00:00:00 2001 From: pjarugula <127721871+pjarugula@users.noreply.github.com> Date: Tue, 30 Jan 2024 13:57:15 +0530 Subject: [PATCH 1/3] refactor: Add line to run tests #1029 * refactor: Read values from synthetic secrets * refactor: Add line to run tests * refactor: Add line to run tests --------- Co-authored-by: pjarugula --- test/deploy/onboarding-tests/roles/configure/tasks/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/deploy/onboarding-tests/roles/configure/tasks/main.yml b/test/deploy/onboarding-tests/roles/configure/tasks/main.yml index 9045913c..7a8892c8 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" @@ -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 c01b7077136cc5092a66f7cb9e30af0d0cb56e08 Mon Sep 17 00:00:00 2001 From: pjarugula Date: Mon, 29 Jan 2024 23:04:20 +0530 Subject: [PATCH 2/3] refactor: Add command to install git --- .../roles/configure/tasks/main.yml | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/test/deploy/onboarding-tests/roles/configure/tasks/main.yml b/test/deploy/onboarding-tests/roles/configure/tasks/main.yml index 77837eba..4ec553ce 100755 --- a/test/deploy/onboarding-tests/roles/configure/tasks/main.yml +++ b/test/deploy/onboarding-tests/roles/configure/tasks/main.yml @@ -2,9 +2,23 @@ - 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" +- name: Install Git on Linux + become: yes + apt: + name: git + state: present + - name: Clone the Onboarding tests repository git: repo: https://github.com/newrelic/onboarding-e2e-tests.git @@ -18,7 +32,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" @@ -34,6 +48,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 + chdir: ~/tests/onboarding-e2e-tests \ No newline at end of file From 237ae30a7cf939ace6f59955dffaff61f96b3f62 Mon Sep 17 00:00:00 2001 From: pjarugula Date: Tue, 30 Jan 2024 16:28:52 +0530 Subject: [PATCH 3/3] refactor: add extra space --- test/deploy/onboarding-tests/roles/configure/tasks/main.yml | 3 ++- 1 file changed, 2 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 4ec553ce..04ebd0f1 100755 --- a/test/deploy/onboarding-tests/roles/configure/tasks/main.yml +++ b/test/deploy/onboarding-tests/roles/configure/tasks/main.yml @@ -50,4 +50,5 @@ - name: Test playwright scripts shell: "npx playwright test --config=playwright.config.validations.js" args: - chdir: ~/tests/onboarding-e2e-tests \ No newline at end of file + chdir: ~/tests/onboarding-e2e-tests + \ No newline at end of file