From 48b8f5c2cff7a1d6a03663b635fa8f439aeb9d6e Mon Sep 17 00:00:00 2001 From: Craig Perkins Date: Fri, 19 Apr 2024 23:37:17 -0400 Subject: [PATCH] Use separate steps Signed-off-by: Craig Perkins --- .../workflows/cypress-test-multiauth-e2e.yml | 17 +++++++++++++---- .github/workflows/cypress-test-oidc-e2e.yml | 13 +++++++++++-- .github/workflows/cypress-test-saml-e2e.yml | 13 +++++++++++-- 3 files changed, 35 insertions(+), 8 deletions(-) diff --git a/.github/workflows/cypress-test-multiauth-e2e.yml b/.github/workflows/cypress-test-multiauth-e2e.yml index 54ce69858..fa4baa6c0 100644 --- a/.github/workflows/cypress-test-multiauth-e2e.yml +++ b/.github/workflows/cypress-test-multiauth-e2e.yml @@ -93,13 +93,22 @@ jobs: - name: Run OSD with basePath if: ${{ matrix.basePath != '' }} run: | - echo "server.basePath: \"${{ matrix.basePath }}\"" >> opensearch_dashboards_openid.yml - echo "server.rewriteBasePath: true" >> opensearch_dashboards_openid.yml + echo "server.basePath: \"${{ matrix.basePath }}\"" >> opensearch_dashboards_multiauth.yml + echo "server.rewriteBasePath: true" >> opensearch_dashboards_multiauth.yml - - name: Run Cypress Tests + - name: Run Cypress Tests with basePath + if: ${{ matrix.basePath != '' }} uses: ./.github/actions/run-cypress-tests with: security_config_file: config_multiauth.yml dashboards_config_file: opensearch_dashboards_multiauth.yml - yarn_command: 'yarn cypress:run --browser chrome --headless --env loginMethod=saml_multiauth ${{ matrix.basePath != '' ? `--env basePath=${matrix.basePath}` : '' }} --spec "test/cypress/e2e/saml/*.js"' + yarn_command: 'yarn cypress:run --browser chrome --headless --env loginMethod=saml_multiauth --env basePath=${{ matrix.basePath }} --spec "test/cypress/e2e/saml/*.js"' osd_base_path: ${{ matrix.basePath }} + + - name: Run Cypress Tests + if: ${{ matrix.basePath == '' }} + uses: ./.github/actions/run-cypress-tests + with: + security_config_file: config_multiauth.yml + dashboards_config_file: opensearch_dashboards_multiauth.yml + yarn_command: 'yarn cypress:run --browser chrome --headless --env loginMethod=saml_multiauth --spec "test/cypress/e2e/saml/*.js"' diff --git a/.github/workflows/cypress-test-oidc-e2e.yml b/.github/workflows/cypress-test-oidc-e2e.yml index 991ac736e..35499e2ed 100644 --- a/.github/workflows/cypress-test-oidc-e2e.yml +++ b/.github/workflows/cypress-test-oidc-e2e.yml @@ -142,10 +142,19 @@ jobs: echo "server.basePath: \"${{ matrix.basePath }}\"" >> opensearch_dashboards_openid.yml echo "server.rewriteBasePath: true" >> opensearch_dashboards_openid.yml - - name: Run Cypress Tests + - name: Run Cypress Tests with basePath + if: ${{ matrix.basePath != '' }} uses: ./.github/actions/run-cypress-tests with: security_config_file: config_openid.yml dashboards_config_file: opensearch_dashboards_openid.yml - yarn_command: 'yarn cypress:run --browser chrome --headless --spec "test/cypress/e2e/oidc/*.js" ${{ matrix.basePath != '' ? `--env basePath=${matrix.basePath}` : '' }}' + yarn_command: 'yarn cypress:run --browser chrome --headless --spec "test/cypress/e2e/oidc/*.js" --env basePath=${{ matrix.basePath }}' osd_base_path: ${{ matrix.basePath }} + + - name: Run Cypress Tests with basePath + if: ${{ matrix.basePath == '' }} + uses: ./.github/actions/run-cypress-tests + with: + security_config_file: config_openid.yml + dashboards_config_file: opensearch_dashboards_openid.yml + yarn_command: 'yarn cypress:run --browser chrome --headless --spec "test/cypress/e2e/oidc/*.js"' diff --git a/.github/workflows/cypress-test-saml-e2e.yml b/.github/workflows/cypress-test-saml-e2e.yml index 6bc0c96cc..e1a999d79 100644 --- a/.github/workflows/cypress-test-saml-e2e.yml +++ b/.github/workflows/cypress-test-saml-e2e.yml @@ -96,10 +96,19 @@ jobs: echo "server.basePath: \"${{ matrix.basePath }}\"" >> opensearch_dashboards_saml.yml echo "server.rewriteBasePath: true" >> opensearch_dashboards_saml.yml - - name: Run Cypress Tests + - name: Run Cypress Tests with basePath + if: ${{ matrix.basePath != '' }} uses: ./.github/actions/run-cypress-tests with: security_config_file: config_saml.yml dashboards_config_file: opensearch_dashboards_saml.yml - yarn_command: 'yarn cypress:run --browser chrome --headless --spec "test/cypress/e2e/saml/*.js" ${{ matrix.basePath != '' ? `--env basePath=${matrix.basePath}` : '' }}' + yarn_command: 'yarn cypress:run --browser chrome --headless --spec "test/cypress/e2e/saml/*.js" --env basePath=${{ matrix.basePath }}' osd_base_path: ${{ matrix.basePath }} + + - name: Run Cypress Tests with basePath + if: ${{ matrix.basePath == '' }} + uses: ./.github/actions/run-cypress-tests + with: + security_config_file: config_saml.yml + dashboards_config_file: opensearch_dashboards_saml.yml + yarn_command: 'yarn cypress:run --browser chrome --headless --spec "test/cypress/e2e/saml/*.js"'