-
Notifications
You must be signed in to change notification settings - Fork 764
Expand file tree
/
Copy pathtest-prow-e2e-techpreview.sh
More file actions
executable file
·52 lines (41 loc) · 1.63 KB
/
Copy pathtest-prow-e2e-techpreview.sh
File metadata and controls
executable file
·52 lines (41 loc) · 1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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}")"
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