From 1e7b4213551b6ecc4422fa9043c249521c1636bb Mon Sep 17 00:00:00 2001 From: Ryan Liang <109499885+RyanL1997@users.noreply.github.com> Date: Tue, 3 Oct 2023 08:06:35 -0700 Subject: [PATCH] CI fixes for adapting admin password change and fix the Cypress browser (#1596) * Add the random admin password flow Signed-off-by: Ryan Liang * Pass --headless=old Signed-off-by: Ryan Liang * Switch to firefox for cypress Signed-off-by: Ryan Liang * Fix the typo of firefox driver Signed-off-by: Ryan Liang * Directly changed admin password into admin in ci Signed-off-by: Ryan Liang --------- Signed-off-by: Ryan Liang --- .github/workflows/cypress-test-tenancy-disabled.yml | 3 ++- .github/workflows/cypress-test.yml | 9 +++++---- .github/workflows/integration-test.yml | 3 ++- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cypress-test-tenancy-disabled.yml b/.github/workflows/cypress-test-tenancy-disabled.yml index 23494d1c3..3c6c084cf 100644 --- a/.github/workflows/cypress-test-tenancy-disabled.yml +++ b/.github/workflows/cypress-test-tenancy-disabled.yml @@ -50,6 +50,7 @@ jobs: opensearch-version: ${{ env.OPENSEARCH_VERSION }} plugin-name: ${{ env.PLUGIN_NAME }} setup-script-name: setup + admin-password: admin - name: Run Dashboard with Security Dashboards Plugin uses: ./.github/actions/install-dashboards @@ -73,4 +74,4 @@ jobs: git clone https://github.com/opensearch-project/opensearch-dashboards-functional-test.git cd opensearch-dashboards-functional-test npm install cypress --save-dev - yarn cypress:run-with-security --browser chrome --spec "cypress/integration/plugins/security-dashboards-plugin/inaccessible_tenancy_features.js" + yarn cypress:run-with-security --browser firefox --spec "cypress/integration/plugins/security-dashboards-plugin/inaccessible_tenancy_features.js" diff --git a/.github/workflows/cypress-test.yml b/.github/workflows/cypress-test.yml index c5e5370c1..745ef077d 100644 --- a/.github/workflows/cypress-test.yml +++ b/.github/workflows/cypress-test.yml @@ -20,7 +20,7 @@ jobs: os: [ ubuntu-latest , windows-latest ] runs-on: ${{ matrix.os }} - steps: + steps: - name: Set up JDK uses: actions/setup-java@v1 with: @@ -50,6 +50,7 @@ jobs: opensearch-version: ${{ env.OPENSEARCH_VERSION }} plugin-name: ${{ env.PLUGIN_NAME }} setup-script-name: setup + admin-password: admin - name: Run Dashboard with Security Dashboards Plugin uses: ./.github/actions/install-dashboards @@ -75,6 +76,6 @@ jobs: git clone https://github.com/opensearch-project/opensearch-dashboards-functional-test.git cd opensearch-dashboards-functional-test npm install cypress --save-dev - yarn cypress:run-with-security-and-aggregation-view --browser chrome --spec "cypress/integration/plugins/security-dashboards-plugin/aggregation_view.js" - yarn cypress:run-with-security --browser chrome --spec "cypress/integration/plugins/security-dashboards-plugin/multi_tenancy.js" - yarn cypress:run-with-security --browser chrome --spec "cypress/integration/plugins/security-dashboards-plugin/default_tenant.js" + yarn cypress:run-with-security-and-aggregation-view --browser firefox --spec "cypress/integration/plugins/security-dashboards-plugin/aggregation_view.js" + yarn cypress:run-with-security --browser firefox --spec "cypress/integration/plugins/security-dashboards-plugin/multi_tenancy.js" + yarn cypress:run-with-security --browser firefox --spec "cypress/integration/plugins/security-dashboards-plugin/default_tenant.js" diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index a3d6f70d1..7ac0dba0a 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -19,7 +19,7 @@ jobs: steps: - name: Checkout Branch uses: actions/checkout@v3 - + - name: Set up JDK uses: actions/setup-java@v1 with: @@ -64,6 +64,7 @@ jobs: opensearch-version: ${{ env.OPENSEARCH_VERSION }} plugin-name: ${{ env.PLUGIN_NAME }} setup-script-name: setup + admin-password: admin - id: install-dashboards uses: ./.github/actions/install-dashboards