From be380afec557e7a147b599b7cc9b0d0c0128c53f Mon Sep 17 00:00:00 2001 From: Omar Al Jaljuli <oaljalju@redhat.com> Date: Fri, 13 Dec 2024 08:00:08 -0500 Subject: [PATCH] chore(e2e): re-enable tech radar test with fix (#2095) --- .ibm/pipelines/auth/secrets-rhdh-secrets.yaml | 2 +- .ibm/pipelines/env_variables.sh | 1 - .ibm/pipelines/utils.sh | 13 ++++--------- .../e2e/plugins/quick-access-and-tech-radar.spec.ts | 3 +-- 4 files changed, 6 insertions(+), 13 deletions(-) diff --git a/.ibm/pipelines/auth/secrets-rhdh-secrets.yaml b/.ibm/pipelines/auth/secrets-rhdh-secrets.yaml index e434164ebe..a1cfe7a91c 100644 --- a/.ibm/pipelines/auth/secrets-rhdh-secrets.yaml +++ b/.ibm/pipelines/auth/secrets-rhdh-secrets.yaml @@ -29,7 +29,7 @@ data: KEYCLOAK_CLIENT_ID: bXljbGllbnQ= KEYCLOAK_CLIENT_SECRET: dGVtcA== ACR_SECRET: dGVtcA== - DH_TARGET_URL: dGVzdC1iYWNrc3RhZ2UtY3VzdG9taXphdGlvbi1wcm92aWRlci1zaG93Y2FzZS1jaS5yaGRoLXByLW9zLWE5ODA1NjUwODMwYjIyYzNhZWUyNDNlNTFkNzk1NjVkLTAwMDAudXMtZWFzdC5jb250YWluZXJzLmFwcGRvbWFpbi5jbG91ZA== + DH_TARGET_URL: dGVtcA== GOOGLE_CLIENT_ID: dGVtcA== GOOGLE_CLIENT_SECRET: dGVtcA== RHDH_BASE_URL: dGVtcA== diff --git a/.ibm/pipelines/env_variables.sh b/.ibm/pipelines/env_variables.sh index fa2248d32d..f65cae705f 100755 --- a/.ibm/pipelines/env_variables.sh +++ b/.ibm/pipelines/env_variables.sh @@ -60,7 +60,6 @@ KEYCLOAK_REALM='myrealm' KEYCLOAK_CLIENT_ID='myclient' KEYCLOAK_CLIENT_SECRET=$(cat /tmp/secrets/KEYCLOAK_CLIENT_SECRET) ACR_SECRET=$(cat /tmp/secrets/ACR_SECRET) -DH_TARGET_URL=dGVzdC1iYWNrc3RhZ2UtY3VzdG9taXphdGlvbi1wcm92aWRlci1zaG93Y2FzZS1jaS5yaGRoLXByLW9zLWE5ODA1NjUwODMwYjIyYzNhZWUyNDNlNTFkNzk1NjVkLTAwMDAudXMtZWFzdC5jb250YWluZXJzLmFwcGRvbWFpbi5jbG91ZA== GOOGLE_CLIENT_ID=$(cat /tmp/secrets/GOOGLE_CLIENT_ID) GOOGLE_CLIENT_SECRET=$(cat /tmp/secrets/GOOGLE_CLIENT_SECRET) GOOGLE_ACC_COOKIE=$(cat /tmp/secrets/GOOGLE_ACC_COOKIE) diff --git a/.ibm/pipelines/utils.sh b/.ibm/pipelines/utils.sh index 0794e677c5..cae0016cc9 100755 --- a/.ibm/pipelines/utils.sh +++ b/.ibm/pipelines/utils.sh @@ -406,7 +406,7 @@ apply_yaml_files() { DH_TARGET_URL=$(echo -n "test-backstage-customization-provider-${project}.${K8S_CLUSTER_ROUTER_BASE}" | base64 -w 0) local RHDH_BASE_URL=$(echo -n "$rhdh_base_url" | base64 | tr -d '\n') - for key in GITHUB_APP_APP_ID GITHUB_APP_CLIENT_ID GITHUB_APP_PRIVATE_KEY GITHUB_APP_CLIENT_SECRET GITHUB_APP_JANUS_TEST_APP_ID GITHUB_APP_JANUS_TEST_CLIENT_ID GITHUB_APP_JANUS_TEST_CLIENT_SECRET GITHUB_APP_JANUS_TEST_PRIVATE_KEY GITHUB_APP_WEBHOOK_URL GITHUB_APP_WEBHOOK_SECRET KEYCLOAK_CLIENT_SECRET ACR_SECRET GOOGLE_CLIENT_ID GOOGLE_CLIENT_SECRET K8S_CLUSTER_TOKEN_ENCODED OCM_CLUSTER_URL GITLAB_TOKEN KEYCLOAK_AUTH_BASE_URL KEYCLOAK_AUTH_CLIENTID KEYCLOAK_AUTH_CLIENT_SECRET KEYCLOAK_AUTH_LOGIN_REALM KEYCLOAK_AUTH_REALM RHDH_BASE_URL; do + for key in GITHUB_APP_APP_ID GITHUB_APP_CLIENT_ID GITHUB_APP_PRIVATE_KEY GITHUB_APP_CLIENT_SECRET GITHUB_APP_JANUS_TEST_APP_ID GITHUB_APP_JANUS_TEST_CLIENT_ID GITHUB_APP_JANUS_TEST_CLIENT_SECRET GITHUB_APP_JANUS_TEST_PRIVATE_KEY GITHUB_APP_WEBHOOK_URL GITHUB_APP_WEBHOOK_SECRET KEYCLOAK_CLIENT_SECRET ACR_SECRET GOOGLE_CLIENT_ID GOOGLE_CLIENT_SECRET K8S_CLUSTER_TOKEN_ENCODED OCM_CLUSTER_URL GITLAB_TOKEN KEYCLOAK_AUTH_BASE_URL KEYCLOAK_AUTH_CLIENTID KEYCLOAK_AUTH_CLIENT_SECRET KEYCLOAK_AUTH_LOGIN_REALM KEYCLOAK_AUTH_REALM RHDH_BASE_URL DH_TARGET_URL; do sed -i "s|${key}:.*|${key}: ${!key}|g" "$dir/auth/secrets-rhdh-secrets.yaml" done @@ -462,14 +462,9 @@ deploy_test_backstage_provider() { else echo "BuildConfig for test-backstage-customization-provider already exists in ${project}. Skipping new-app creation." fi - - # Ensure the service exists - if ! oc get service test-backstage-customization-provider -n "${project}" >/dev/null 2>&1; then - echo "Exposing service for test-backstage-customization-provider" - oc expose svc/test-backstage-customization-provider --namespace="${project}" - else - echo "Service test-backstage-customization-provider is already exposed in ${project}." - fi + + echo "Exposing service for test-backstage-customization-provider" + oc expose svc/test-backstage-customization-provider --namespace="${project}" } create_app_config_map() { diff --git a/e2e-tests/playwright/e2e/plugins/quick-access-and-tech-radar.spec.ts b/e2e-tests/playwright/e2e/plugins/quick-access-and-tech-radar.spec.ts index 298616d2af..f8937bad94 100644 --- a/e2e-tests/playwright/e2e/plugins/quick-access-and-tech-radar.spec.ts +++ b/e2e-tests/playwright/e2e/plugins/quick-access-and-tech-radar.spec.ts @@ -19,8 +19,7 @@ test.describe("Test Customized Quick Access and tech-radar plugin", () => { await homePage.verifyQuickAccess("SECURITY TOOLS", "Keycloak", true); }); - // TODO: Investigate why Tech Radar is showing "Process" instead of "Storage". - test.skip("Verify tech-radar", async ({ page }) => { + test("Verify tech-radar", async ({ page }) => { const uiHelper = new UIhelper(page); const techRadar = new TechRadar(page);