-
Notifications
You must be signed in to change notification settings - Fork 750
OCPBUGS-115298: Rename e2e scripts so playwright is the main one #17127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
|
logonoff marked this conversation as resolved.
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| #!/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}")" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win 🔎 Supported by static analysis🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
status="$(bash -c 'set -e; export value="$(false)"; printf "%s" "$?"')"
test "$status" = "0"
rg -nP '^\s*export\s+[A-Za-z_][A-Za-z0-9_]*="\$\(' \
test-prow-cypress-e2e.sh test-prow-e2e-techpreview.shRepository: openshift/console Length of output: 722 🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
for file in test-prow-cypress-e2e.sh test-prow-e2e-techpreview.sh; do
printf '%s\n' "== $file =="
sed -n '1,18p' "$file"
if [ "$file" = "test-prow-e2e-techpreview.sh" ]; then
sed -n '30,45p' "$file"
fi
doneRepository: openshift/console Length of output: 1792 Preserve failures from credential and cluster discovery commands. In both scripts, 🧰 Tools🪛 Shellcheck (0.11.0)[warning] 9-9: Declare and assign separately to avoid masking return values. (SC2155) 📍 Affects 2 files
🤖 Prompt for AI AgentsSource: Linters/SAST tools |
||
| set -x | ||
| export BRIDGE_BASE_ADDRESS="$(oc get consoles.config.openshift.io cluster -o jsonpath='{.status.consoleURL}')" | ||
|
|
||
| ./contrib/create-user.sh | ||
|
|
||
| pushd frontend | ||
|
|
||
| if [ ! -d node_modules ]; then | ||
| yarn install | ||
| fi | ||
|
|
||
| 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 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win 🔎 Supported by static analysis🏁 Script executed: printf '%s\n' '--- repository conventions and learnings ---'
find /tmp/coderabbit-repo-knowledge/openshift-console-9a1dd4c8 -maxdepth 2 -type f -print
printf '%s\n' '--- changed file ---'
nl -ba test-prow-e2e-cypress.sh | sed -n '1,80p'
printf '%s\n' '--- relevant diff ---'
git diff -- test-prow-e2e-cypress.shRepository: openshift/console Length of output: 1843 🏁 Script executed: printf '%s\n' '--- repository-wide conventions ---'
cat /tmp/coderabbit-repo-knowledge/openshift-console-9a1dd4c8/conventions/repo-wide.md
printf '%s\n' '--- workflow conventions ---'
cat /tmp/coderabbit-repo-knowledge/openshift-console-9a1dd4c8/conventions/github-workflows.md
printf '%s\n' '--- script with line numbers ---'
awk '{printf "%5d %s\n", NR, $0}' test-prow-e2e-cypress.sh | sed -n '1,80p'
printf '%s\n' '--- status and diff stat ---'
git status --short
git diff --stat -- test-prow-e2e-cypress.shRepository: openshift/console Length of output: 13167 🏁 Script executed: printf '%s\n' '--- consumer argument contract ---'
awk '{printf "%5d %s\n", NR, $0}' frontend/integration-tests/test-cypress.sh | sed -n '1,180p'
printf '%s\n' '--- callers and package values ---'
rg -n --glob '*.sh' 'test-prow-e2e-cypress\.sh|nightly-cypress|test-cypress\.sh' . | sed -n '1,160p'Repository: openshift/console Length of output: 6031 Preserve the optional package argument as one argument.
🧰 Tools🪛 Shellcheck (0.11.0)[info] 28-28: Double quote to prevent globbing and word splitting. (SC2086) 🤖 Prompt for AI AgentsSource: Linters/SAST tools |
||
| elif [ "$SCENARIO" == "e2e" ] || [ "$SCENARIO" == "release" ]; then | ||
| ./integration-tests/test-cypress.sh -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 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win Reject unsupported Cypress scenarios. When Proposed fix elif [ "$SCENARIO" == "pipelines" ]; then
./integration-tests/test-cypress.sh -p pipelines -h true
+else
+ echo "error: unknown scenario '$SCENARIO'" >&2
+ exit 1
fi🤖 Prompt for AI Agents |
||
|
|
||
| env NO_SANDBOX=true yarn test-puppeteer-csp | ||
|
|
||
| popd | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,52 @@ | ||
| #!/usr/bin/env bash | ||
| # | ||
| # Prow / CI entrypoint for Playwright E2E tech-preview tests against a live OpenShift cluster. | ||
| # Runs OLM tests that require Tech Preview to be enabled, including: | ||
| # - Operator catalog items display test (OLMv1 path active on Tech Preview clusters) | ||
| # - Operator lifecycle metadata test (requires OLMLifecycleAndCompatibility feature gate) | ||
| # | ||
| # Run from the openshift/console repository root. | ||
| # | ||
| # Environment (typical Prow / installer): | ||
| # ARTIFACT_DIR, INSTALLER_DIR, KUBEADMIN_PASSWORD_FILE same as test-prow-e2e.sh | ||
| # | ||
|
|
||
| set -exuo pipefail | ||
|
|
||
| REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | ||
| cd "${REPO_ROOT}" | ||
|
|
||
| ARTIFACT_DIR=${ARTIFACT_DIR:-/tmp/artifacts} | ||
| INSTALLER_DIR=${INSTALLER_DIR:=${ARTIFACT_DIR}/installer} | ||
|
|
||
| # Validate ARTIFACT_DIR is set and is an absolute path | ||
| if [ -z "$ARTIFACT_DIR" ]; then | ||
| echo "Error: ARTIFACT_DIR is not set" >&2 | ||
| exit 1 | ||
| fi | ||
| case "$ARTIFACT_DIR" in | ||
| /) echo "Error: ARTIFACT_DIR must not be '/'" >&2; exit 1 ;; | ||
| /*) ;; # absolute path, OK | ||
| *) echo "Error: ARTIFACT_DIR must be an absolute path, got: $ARTIFACT_DIR" >&2; exit 1 ;; | ||
| esac | ||
|
|
||
| export ARTIFACT_DIR INSTALLER_DIR | ||
| mkdir -p "${ARTIFACT_DIR}" | ||
|
|
||
| # don't log kubeadmin-password | ||
| set +x | ||
| export BRIDGE_KUBEADMIN_PASSWORD="$(cat "${KUBEADMIN_PASSWORD_FILE:-${INSTALLER_DIR}/auth/kubeadmin-password}")" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win Preserve failures from credential and cluster discovery commands. Assign each command result before exporting it. Using The same issue applies to the Cypress wrapper's credential and base-address assignments. 📍 Affects 2 files
🤖 Prompt for AI AgentsSource: Linters/SAST tools |
||
| set -x | ||
| export BRIDGE_BASE_ADDRESS="$(oc get consoles.config.openshift.io cluster -o jsonpath='{.status.consoleURL}')" | ||
|
|
||
| ./contrib/create-user.sh | ||
|
|
||
| pushd frontend | ||
|
|
||
| if [ ! -d node_modules ]; then | ||
| yarn install | ||
| fi | ||
|
|
||
| ./integration-tests/test-playwright.sh -- e2e/tests/olm/operator-lifecycle-metadata.spec.ts e2e/tests/dev-console/catalog.spec.ts "$@" | ||
|
|
||
| popd | ||
This file was deleted.
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.