From 45dc18e8d3dcbe20ac254d8fcfc11fb9ba15c01c Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Thu, 4 Jan 2024 14:14:10 -0500 Subject: [PATCH] Update cypress E2E workflow to reflect changes to default admin password (#1714) (#1719) Signed-off-by: Darshit Chanpura (cherry picked from commit 96a449f5bf6c25aede181da93b0bf93545d66f7f) Co-authored-by: Darshit Chanpura <35282393+DarshitChanpura@users.noreply.github.com> --- .github/workflows/cypress-test-oidc-e2e.yml | 5 ++--- .github/workflows/cypress-test-saml-e2e.yml | 7 +++---- cypress.config.js | 2 +- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/cypress-test-oidc-e2e.yml b/.github/workflows/cypress-test-oidc-e2e.yml index 02c7970aa..d24cd581d 100644 --- a/.github/workflows/cypress-test-oidc-e2e.yml +++ b/.github/workflows/cypress-test-oidc-e2e.yml @@ -12,6 +12,7 @@ env: PLUGIN_NAME: opensearch-security # This is the SHA256 checksum of the known good kc.sh script for Keycloak version 21.0.1. KNOWN_CHECKSUM_OF_KEYCLOAK_SCRIPT: 'f825ea1a9ffa5ad91673737c06857ababbb69b6b8f09e0c637b4c998517f9608' + OPENSEARCH_INITIAL_ADMIN_PASSWORD: myStrongPassword123! jobs: tests: @@ -21,8 +22,6 @@ jobs: matrix: os: [ ubuntu-latest ] runs-on: ${{ matrix.os }} - env: - OPENSEARCH_INITIAL_ADMIN_PASSWORD: admin steps: - name: Set up JDK @@ -191,7 +190,7 @@ jobs: # Verify that the server is operational - name: Check OpenSearch Running on Linux if: ${{ runner.os != 'Windows'}} - run: curl https://localhost:9200/_cat/plugins -u 'admin:admin' -k -v + run: curl https://localhost:9200/_cat/plugins -u 'admin:${{ env.OPENSEARCH_INITIAL_ADMIN_PASSWORD }}' -k -v shell: bash - if: always() diff --git a/.github/workflows/cypress-test-saml-e2e.yml b/.github/workflows/cypress-test-saml-e2e.yml index 8da609f0c..ffa0df221 100644 --- a/.github/workflows/cypress-test-saml-e2e.yml +++ b/.github/workflows/cypress-test-saml-e2e.yml @@ -8,7 +8,8 @@ env: # avoid warnings like "tput: No value for $TERM and no -T specified" TERM: xterm PLUGIN_NAME: opensearch-security - + OPENSEARCH_INITIAL_ADMIN_PASSWORD: myStrongPassword123! + jobs: tests: name: Run Cypress E2E SAML tests @@ -17,8 +18,6 @@ jobs: matrix: os: [ ubuntu-latest ] runs-on: ${{ matrix.os }} - env: - OPENSEARCH_INITIAL_ADMIN_PASSWORD: admin steps: - name: Set up JDK @@ -147,7 +146,7 @@ jobs: # Verify that the server is operational - name: Check OpenSearch Running on Linux if: ${{ runner.os != 'Windows'}} - run: curl https://localhost:9200/_cat/plugins -u 'admin:admin' -k -v + run: curl https://localhost:9200/_cat/plugins -u 'admin:${{ env.OPENSEARCH_INITIAL_ADMIN_PASSWORD }}' -k -v shell: bash - if: always() diff --git a/cypress.config.js b/cypress.config.js index 56d619ab5..e5a86728b 100644 --- a/cypress.config.js +++ b/cypress.config.js @@ -30,6 +30,6 @@ module.exports = defineConfig({ env: { openSearchUrl: 'https://localhost:9200', adminUserName: 'admin', - adminPassword: 'admin', + adminPassword: 'myStrongPassword123!', }, });