diff --git a/frontend/integration-tests/test-cypress.sh b/frontend/integration-tests/test-cypress.sh deleted file mode 100755 index c0089710227..00000000000 --- a/frontend/integration-tests/test-cypress.sh +++ /dev/null @@ -1,108 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -ARTIFACT_DIR=${ARTIFACT_DIR:=/tmp/artifacts} -SCREENSHOTS_DIR=gui_test_screenshots - -# https://ci-operator-configresolver-ui-ci.apps.ci.l2s4.p1.openshiftapps.com/help#env -OPENSHIFT_CI=${OPENSHIFT_CI:=false} - -if [ "$(basename "$(pwd)")" != "frontend" ]; then - echo "This script must be run from the frontend folder" - exit 1 -fi - -# Disable color codes in Cypress since they do not render well CI test logs. -# https://docs.cypress.io/guides/guides/continuous-integration.html#Colors -if [ "$OPENSHIFT_CI" = true ]; then - export NO_COLOR=1 -fi - -if [ ! -d node_modules ]; then - yarn install -fi - -function copyArtifacts { - if [ -d "$ARTIFACT_DIR" ] && [ -d "$SCREENSHOTS_DIR" ]; then - echo "Copying artifacts from $(pwd)..." - cp -r "$SCREENSHOTS_DIR" "${ARTIFACT_DIR}/gui_test_screenshots" - fi -} - -function generateReport { - yarn run cypress-postreport - if test -f ./packages/integration-tests/cypress-a11y-report.json; then - yarn cypress-a11y-report - fi -} -trap "copyArtifacts; generateReport" EXIT - -while getopts p:s:h:l:n: flag -do - case "${flag}" in - p) pkg=${OPTARG};; - s) spec=${OPTARG};; - h) headless=${OPTARG};; - n) nightly=${OPTARG};; - esac -done - -if [ $# -eq 0 ]; then - echo "Runs Cypress tests in Test Runner or headless mode" - echo "Usage: test-cypress [-p] [-s] [-h true] [-n true/false]" - echo " '-p ' may be 'console, 'olm', 'devconsole'" - echo " '-s ' is a file mask for spec test files, such as 'tests/monitoring/*'. Used only in headless mode when '-p' is specified." - echo " '-h true' runs Cypress in headless mode. When omitted, launches Cypress Test Runner" - echo " '-n true' runs the 'nightly' suite, all specs from selected packages in headless mode" - echo "Examples:" - echo " test-cypress.sh // displays this help text" - echo " test-cypress.sh -p console // opens Cypress Test Runner for console tests" - echo " test-cypress.sh -p olm // opens Cypress Test Runner for OLM tests" - echo " test-cypress.sh -p dev-console // opens Cypress Test Runner for Dev-Console tests" - echo " test-cypress.sh -p knative // opens Cypress Test Runner for knative tests" - echo " test-cypress.sh -h true // runs all packages in headless mode" - echo " test-cypress.sh -p olm -h true // runs OLM tests in headless mode" - echo " test-cypress.sh -p console -s 'tests/crud/*' -h true // runs console CRUD tests in headless mode" - echo " test-cypress.sh -n true // runs the whole nightly suite" - trap EXIT - exit; -fi - -if [ -n "${nightly-}" ] && [ -z "${pkg-}" ]; then - # do not fail fast, let all suites run - set +e - err=0 - trap 'err=1' ERR - - yarn run test-cypress-dev-console-nightly - yarn run test-cypress-helm-nightly - # yarn run test-cypress-knative-nightly - exit $err; -fi - -if [ -n "${headless-}" ] && [ -z "${pkg-}" ]; then - yarn run test-cypress-console-headless - yarn run test-cypress-dev-console-headless - yarn run test-cypress-olm-headless - yarn run test-cypress-helm-headless - # yarn run test-cypress-knative-headless - exit; -fi - -yarn_script="test-cypress" - -if [ -n "${pkg-}" ]; then - yarn_script="$yarn_script-$pkg" -fi - -if [ -n "${nightly-}" ]; then - yarn_script="$yarn_script-nightly" -elif [ -n "${headless-}" ]; then - yarn_script="$yarn_script-headless" -fi - -if [ -n "${spec-}" ] && [ -z "${nightly-}"]; then - yarn_script="$yarn_script --spec '$spec'" -fi - -yarn run $yarn_script diff --git a/test-prow-e2e-techpreview.sh b/test-prow-e2e-techpreview.sh deleted file mode 100755 index ab2412a123c..00000000000 --- a/test-prow-e2e-techpreview.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -set -exuo pipefail diff --git a/test-prow-e2e.sh b/test-prow-e2e.sh deleted file mode 100755 index 5aba89af480..00000000000 --- a/test-prow-e2e.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/env bash - -set -exuo pipefail - -INSTALLER_DIR=${INSTALLER_DIR:=${ARTIFACT_DIR}/installer} - -# don't log kubeadmin-password -set +x -export BRIDGE_KUBEADMIN_PASSWORD="$(cat "${KUBEADMIN_PASSWORD_FILE:-${INSTALLER_DIR}/auth/kubeadmin-password}")" -set -x -export BRIDGE_BASE_ADDRESS="$(oc get consoles.config.openshift.io cluster -o jsonpath='{.status.consoleURL}')" - -./contrib/create-user.sh - -pushd frontend - -SCENARIO="${1:-e2e}" - -if [ "$SCENARIO" == "nightly-cypress" ]; then - PACKAGE="" - if [ $# -gt 1 ]; then - PACKAGE="-p $2" - fi - ./integration-tests/test-cypress.sh -n true $PACKAGE -elif [ "$SCENARIO" == "e2e" ] || [ "$SCENARIO" == "release" ]; then - ./integration-tests/test-cypress.sh -h true -elif [ "$SCENARIO" == "login" ]; then - ./integration-tests/test-cypress.sh -p console -s 'tests/app/auth-multiuser-login.cy.ts' -h true -elif [ "$SCENARIO" == "olmFull" ]; then - ./integration-tests/test-cypress.sh -p olm -h true -elif [ "$SCENARIO" == "dev-console" ]; then - ./integration-tests/test-cypress.sh -p dev-console -h true -elif [ "$SCENARIO" == "pipelines" ]; then - ./integration-tests/test-cypress.sh -p pipelines -h true -# Disabled: knative-ci.feature failing in CI (OCPBUGS-82512) -# elif [ "$SCENARIO" == "knative" ]; then -# ./integration-tests/test-cypress.sh -p knative -h true -fi - -env NO_SANDBOX=true yarn test-puppeteer-csp - -popd diff --git a/test-prow-playwright-e2e.sh b/test-prow-playwright-e2e.sh index ffded4ce090..98313a76f63 100755 --- a/test-prow-playwright-e2e.sh +++ b/test-prow-playwright-e2e.sh @@ -1,10 +1,10 @@ #!/usr/bin/env bash # # Prow / CI entrypoint for Playwright E2E against a live OpenShift cluster console. -# Mirrors test-prow-e2e.sh: kubeadmin password, BRIDGE_BASE_ADDRESS from the cluster, -# contrib/create-user.sh, then tests under frontend/, and the same CSP check as Cypress Prow. +# Sets up kubeadmin password, BRIDGE_BASE_ADDRESS from the cluster, +# contrib/create-user.sh, then tests under frontend/, and the CSP check. # -# Run from the openshift/console repository root (same as test-prow-e2e.sh). +# Run from the openshift/console repository root. # # Usage: # ./test-prow-playwright-e2e.sh [e2e|release|smoke] [arguments passed to: playwright test ...] @@ -14,7 +14,7 @@ # smoke — Playwright smoke project (--project=smoke) # # Environment (typical Prow / installer): -# ARTIFACT_DIR, INSTALLER_DIR, KUBEADMIN_PASSWORD_FILE same as test-prow-e2e.sh +# ARTIFACT_DIR, INSTALLER_DIR, KUBEADMIN_PASSWORD_FILE # set -exuo pipefail