Skip to content

Commit 036635a

Browse files
authored
refactor(e2e): refactor runtime tests into TypeScript (#4809)
* fix(e2e): consolidate SHOWCASE_RUNTIME_DB into SHOWCASE_RUNTIME project Merge the SHOWCASE_RUNTIME_DB Playwright project into SHOWCASE_RUNTIME to simplify runtime test execution. All runtime tests now run sequentially in a single project (workers: 1) with no inter-project dependencies. Key changes: - Deploy runtime with internal PostgreSQL (Helm sub-chart / operator- managed) instead of external Crunchy DB - External DB tests (RDS, Azure) switch to external DB at runtime via prepareForExternalDatabase() which patches ConfigMap + adds env vars - Operator uses separate rhdh-runtime-config secret for RHDH_RUNTIME_URL to avoid POSTGRES_* env var conflicts with internal DB - schema-mode-env.sh and schema-mode-setup.ts support operator-specific service/secret naming (backstage-psql-*) and POSTGRESQL_ADMIN_PASSWORD preservation - SSL connection conditionally applied (skip for internal DB, enable for external DB) - Added waitForRuntimeDeploymentReady() for config-map tests - Added restartWithRetry() for operator reconciliation resilience - Removed old resource files (values-showcase-postgres.yaml, rds-app-config.yaml, rhdh-start-runtime.yaml) Assisted-by: OpenCode * refactor(e2e): extract shared utilities and eliminate duplication - Extract resolveInstallMethod(), base64Encode/Decode to helper.ts - Deduplicate AppConfigYaml interface into runtime-config.ts - Add patchAppConfig(), restartDeploymentWithRetry(), jsonPatchDeployment() to KubeClient — eliminates repeated ConfigMap patch + deployment restart patterns across postgres-config.ts and schema-mode-setup.ts - Export getKubeApiErrorMessage, run(), discoverRouterBase() for reuse - Deduplicate getDeploymentName() via getRhdhDeploymentName() - Handle @sha256: digest refs in parseCatalogIndexImage() - Type BackstageCR return value Assisted-by: OpenCode * fix(e2e): address review findings - Fix parseCatalogIndexImage digest reconstruction: add ImageRef.separator field (':' for tags, '@' for digests) and imageRefToString() helper so downstream consumers reconstruct refs correctly - Fix patchAppConfig no-op detection: compare YAML before/after mutator to skip unnecessary ConfigMap writes and misleading log messages - Fix removeSchemaModePatchedEnvVars: add explicit backstageIdx === -1 guard with warning log (consistent with ensurePostgresCredEnvVars) Assisted-by: OpenCode * refactor(e2e): unify KubeClient with rhdh-deployment.ts patterns - KubeClient constructor: switch from loadFromOptions() with explicit K8S_CLUSTER_URL/K8S_CLUSTER_TOKEN env vars to loadFromDefault() which reads the kubeconfig file (set by oc login / kubectl config). This aligns with how rhdh-deployment.ts (auth-providers) connects. - Extract waitForBackstageCrd() as standalone function in kube-client.ts, used by both runtime-deploy.ts and rhdh-deployment.ts — eliminates duplicated CRD polling loops. - rhdh-deployment.ts: adopt base64Encode() from helper.ts, getKubeApiErrorMessage() from kube-client.ts for safe error logging. Assisted-by: OpenCode * refactor(e2e): standardize on js-yaml, drop yaml package Migrate rhdh-deployment.ts from the `yaml` npm package to `js-yaml` which is already used by kube-client.ts and runtime-config.ts. The two packages have incompatible APIs (`yaml.parse/stringify` vs `yaml.load/dump`) despite being imported under the same alias, creating a copy-paste trap for developers. Changes: - rhdh-deployment.ts: yaml.parse() -> yaml.load(), yaml.stringify() -> yaml.dump() - package.json: remove direct `yaml` dependency from e2e-tests Assisted-by: OpenCode * refactor(e2e): adopt shared helpers and fix createConfigMap typo - Replace 8 inline Buffer.from() base64 calls with base64Encode/Decode from helper.ts (keycloak.ts, api-helper.ts, annotator.spec.ts, scaffolder-relation-processor.spec.ts) - Fix method name typo: createCongifmap -> createConfigMap in KubeClient - Use kubeClient.createConfigMap() in runtime-deploy.ts instead of inline coreV1Api.createNamespacedConfigMap() calls Assisted-by: OpenCode * refactor(e2e): extract shared utilities from runtime-*.ts Move reusable utilities out of runtime-deploy.ts and runtime-config.ts into shared modules: helper.ts: - run() — shell command execution with stdout/stderr capture - discoverRouterBase() — OpenShift cluster router base discovery - ImageRef interface, imageRefToString(), parseCatalogIndexImage() — image reference parsing utilities kube-client.ts (KubeClient class): - createNamespace() — 409-safe namespace creation - deleteNamespaceIfExists() — 404-safe deletion wrapping deleteNamespaceAndWait() runtime-config.ts re-exports ImageRef, imageRefToString, and parseCatalogIndexImage from helper.ts so existing callers are unaffected. runtime-deploy.ts now imports all shared utilities instead of defining them locally, reducing file size by ~100 lines. Assisted-by: OpenCode * fix(e2e): address review findings in runtime test refactor - Guard against undefined host in RDS/Azure DB test loops by skipping individual DB versions when their host env var is not set, instead of crashing with a TypeError in clearDatabase/configurePostgresCredentials - Fix RELEASE_NAME default mismatch in verify-schema-mode.spec.ts ('developer-hub' -> 'rhdh') to match runtime-config.ts and kube-client.ts - Use resolveInstallMethod() in getRhdhDeploymentName() instead of duplicating install method detection logic - Rewrite updateConfigMapTitle as a thin wrapper around patchAppConfig, eliminating ~65 lines of duplicated read-modify-write ConfigMap logic - Extract deployment env var manipulation from postgres-config.ts into KubeClient methods (removeContainerEnvVars, addContainerEnvVarsFromSecret) so postgres-config.ts stays at the 'what' level while KubeClient handles 'how' to patch deployments Assisted-by: OpenCode * fix(e2e): extract API version constant and clarify assumptions - Extract BACKSTAGE_CR_API_VERSION constant in runtime-config.ts and import it in runtime-deploy.ts, so there is a single place to update when the CRD version bumps - Document the workers:1 assumption on the module-level deployed flag in runtime-deploy.ts to help future readers - Add comment explaining why the operator path uses a computed route URL rather than cluster discovery (deterministic naming convention) Assisted-by: OpenCode * fix(e2e): call ensureRuntimeDeployed in every runtime spec Each runtime spec now calls ensureRuntimeDeployed() in its own beforeAll instead of relying on alphabetical file discovery order (configuration-test/ running before external-database/ and plugin-division-mode-schema/). The call is idempotent — when tests run in order it detects the existing ready deployment and returns immediately. When a spec is run standalone via --grep, it deploys RHDH first. This removes the hidden ordering dependency that the old explicit `dependencies: [SHOWCASE_RUNTIME_DB]` used to make visible. Assisted-by: OpenCode * fix(e2e): drop stale K8S_CLUSTER_URL/TOKEN from header comment KubeClient now uses loadFromDefault() so these env vars are no longer consumed by runtime-deploy.ts. Remove them from the header to keep the documentation accurate. Assisted-by: OpenCode * refactor(e2e): use ImageRef for main container image Change config.image from a plain {registry, repository, tag} object to ImageRef which includes a separator field (':' for tags, '@' for digests). This fixes digest-pinned images (e.g. repo@sha256:...) being incorrectly joined with ':' in generateBackstageCR(). The same ImageRef/imageRefToString() is already used for catalogIndex — this unifies both image references under the same type and construction logic. Assisted-by: OpenCode * refactor(e2e): extract BACKSTAGE_BACKEND_CONTAINER constant Centralize the backstage-backend container name as a named constant in kube-client.ts alongside getRhdhDeploymentName(). Replace hardcoded strings in runtime-config.ts, postgres-config.ts, and schema-mode-setup.ts. rhdh-deployment.ts (auth-providers) also uses the same string but is left for a future PR to avoid expanding scope. Assisted-by: OpenCode * refactor(e2e): extract buildImageRef helper for separator detection Extract the duplicated `tag.startsWith("sha256:") ? "@" : ":" separator logic into a buildImageRef() helper in helper.ts. Used by both runtime-config.ts and rhdh-deployment.ts to construct ImageRef from individual registry/repository/tag env vars. Assisted-by: OpenCode * refactor(e2e): extract shared POSTGRES_ENV_KEYS constant Deduplicate the overlapping POSTGRES_* env var key lists across postgres-config.ts and schema-mode-setup.ts into a shared POSTGRES_ENV_KEYS constant. The external-DB function extends it with PGSSLMODE and NODE_EXTRA_CA_CERTS via POSTGRES_CRED_ENV_KEYS. Assisted-by: OpenCode * refactor(e2e): move schema-mode config to schema-mode-db.ts Move configureSchemaMode() and the default DB user/password constants from runtime-deploy.ts to schema-mode-db.ts where the rest of the schema-mode database utilities live. runtime-deploy.ts imports and calls the function — it no longer owns any schema-mode-specific logic. Assisted-by: OpenCode * refactor(e2e): remove updateConfigMapTitle, use patchAppConfig directly updateConfigMapTitle was a thin wrapper around patchAppConfig with an unused _configMapName parameter and a single caller. Inline the title-update logic into config-map.spec.ts and remove the method from KubeClient. Assisted-by: OpenCode * fix(e2e): fix naming convention lint error for private constant Rename POSTGRES_CRED_ENV_KEYS to postgresCredEnvKeys — private (non-exported) const must be camelCase per the eslint @typescript-eslint/naming-convention rule. Assisted-by: OpenCode * fix(e2e): don't inject POSTGRES_DB env var in external DB tests The placeholder postgres-cred secret doesn't contain a POSTGRES_DB key, causing CreateContainerConfigError when prepareForExternalDatabase() adds a secretKeyRef for it. External DB tests don't need POSTGRES_DB — Backstage auto-creates per-plugin databases when it's unset. Schema-mode tests are unaffected; they manage env vars via their own configureSchemaMode() / schema-mode-setup.ts mechanism. Assisted-by: OpenCode * fix(e2e): adapt new KubeClient methods to modular kube-client structure After rebasing onto main, the kube-client.ts monolith was split into kube-client/ directory modules. Add methods and constants that our PR introduced to the new modular structure: - BACKSTAGE_BACKEND_CONTAINER constant - patchAppConfig, jsonPatchDeployment, restartDeploymentWithRetry - removeContainerEnvVars, addContainerEnvVarsFromSecret - waitForBackstageCrd, createConfigMap, deleteNamespaceIfExists, createNamespace - getRhdhDeploymentName: use resolveInstallMethod() for INSTALL_METHOD env var Fix all oxlint violations to comply with strict + pedantic linting: - Replace || with ?? for nullish coalescing - Add explicit nullish/empty checks for strict-boolean-expressions - Fix setTimeout in Promise executors for strict-void-return - Move inline comments to separate lines - Add type annotations and safe type assertions - Swap negated conditions to positive form Assisted-by: OpenCode * fix(e2e): fix inverted pod failure detection for transient container states The checkWaitingContainerState function had inverted logic — it treated transient states like PodInitializing and ContainerCreating as failures while silently ignoring actual failure states like CrashLoopBackOff and ImagePullBackOff. This caused the runtime tests to fail immediately during operator deployment because the init container (install-dynamic-plugins) triggers PodInitializing state, which was incorrectly flagged as a pod failure. Assisted-by: OpenCode * fix(e2e): fix runtime test timeouts caused by WebSocket teardown hang Runtime tests that navigate to the RHDH UI establish WebSocket connections (event-stream). When the test body completes, Playwright's page fixture teardown hangs for up to 10 minutes waiting for the browser context to close because the WebSocket connections are never dropped. Fix: navigate to about:blank at the end of each test that uses the page fixture to close all active connections before Playwright tears down the context. Also add a 10-minute project-level timeout for the SHOWCASE_RUNTIME project — runtime tests restart the RHDH deployment (ConfigMap changes, external DB reconfiguration, schema-mode setup) which takes 60-90s per restart. Assisted-by: OpenCode
1 parent 8ba9f0e commit 036635a

29 files changed

Lines changed: 1685 additions & 503 deletions

.ci/pipelines/jobs/ocp-nightly.sh

Lines changed: 10 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -47,35 +47,17 @@ run_standard_deployment_tests() {
4747
}
4848

4949
run_runtime_config_change_tests() {
50-
# Deploy `showcase-runtime` to run tests that require configuration changes at runtime
51-
52-
# Create the namespace first (this will delete/recreate it)
53-
namespace::configure "${NAME_SPACE_RUNTIME}"
54-
55-
# Configure external PostgreSQL credentials and certificates for runtime namespace
56-
# This creates postgres-crt and postgres-cred secrets needed by values-showcase-postgres.yaml
57-
# IMPORTANT: Must be called AFTER namespace is created but BEFORE helm install
58-
configure_external_postgres_db "${NAME_SPACE_RUNTIME}"
59-
60-
# Deploy RHDH with Helm (skip namespace creation since we already did it)
61-
helm::uninstall "${NAME_SPACE_RUNTIME}" "${RELEASE_NAME}"
62-
oc apply -f "$DIR/resources/postgres-db/dynamic-plugins-root-PVC.yaml" -n "${NAME_SPACE_RUNTIME}"
63-
# shellcheck disable=SC2046
64-
helm upgrade -i "${RELEASE_NAME}" -n "${NAME_SPACE_RUNTIME}" \
65-
"${HELM_CHART_URL}" --version "${CHART_VERSION}" \
66-
-f "$DIR/resources/postgres-db/values-showcase-postgres.yaml" \
67-
--set global.clusterRouterBase="${K8S_CLUSTER_ROUTER_BASE}" \
68-
$(helm::get_image_params)
69-
70-
# Configure schema-mode environment (opt-in: tests skip if env not configured)
71-
if configure_schema_mode_runtime_env "${NAME_SPACE_RUNTIME}" "${RELEASE_NAME}" helm; then
72-
log::info "Schema-mode environment configured successfully; schema-mode tests will run"
73-
else
74-
log::warn "Schema-mode environment not configured; schema-mode tests will skip (this is expected if PostgreSQL is not available)"
75-
fi
76-
50+
# Runtime tests handle their own deployment via TypeScript (runtime-deploy.ts).
51+
# The first test file (config-map.spec.ts) calls ensureRuntimeDeployed() which:
52+
# - Creates the namespace
53+
# - Deploys RHDH with Helm + internal PostgreSQL sub-chart
54+
# - Configures schema-mode env vars for port-forwarding
55+
# Subsequent test files reuse the existing deployment (workers: 1).
56+
#
57+
# The CI wrapper only needs to set environment variables and invoke Playwright.
58+
59+
export INSTALL_METHOD="helm"
7760
local runtime_url="https://${RELEASE_NAME}-developer-hub-${NAME_SPACE_RUNTIME}.${K8S_CLUSTER_ROUTER_BASE}"
78-
# Run tests - allow failures since schema-mode tests are opt-in
7961
testing::run_tests "${RELEASE_NAME}" "${NAME_SPACE_RUNTIME}" "${PW_PROJECT_SHOWCASE_RUNTIME}" "${runtime_url}" || true
8062
}
8163

.ci/pipelines/jobs/ocp-operator.sh

Lines changed: 8 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -68,48 +68,15 @@ initiate_operator_deployments_osd_gcp() {
6868
}
6969

7070
run_operator_runtime_config_change_tests() {
71-
# Deploy `showcase-runtime` to run tests that require configuration changes at runtime.
72-
# Uses enableLocalDb=false with external Crunchy PostgreSQL for both runtime and schema-mode tests.
73-
namespace::configure "${NAME_SPACE_RUNTIME}"
74-
71+
# Runtime tests handle their own deployment via TypeScript (runtime-deploy.ts).
72+
# The first test file (config-map.spec.ts) calls ensureRuntimeDeployed() which:
73+
# - Creates the namespace
74+
# - Deploys RHDH via the operator with internal PostgreSQL
75+
# - Configures schema-mode env vars for port-forwarding
76+
# Subsequent test files reuse the existing deployment (workers: 1).
77+
#
78+
# INSTALL_METHOD=operator is already exported in handle_ocp_operator().
7579
local runtime_url="https://backstage-${RELEASE_NAME}-${NAME_SPACE_RUNTIME}.${K8S_CLUSTER_ROUTER_BASE}"
76-
local postgres_ready
77-
postgres_ready=false
78-
79-
# Set up real external PostgreSQL (Crunchy) instead of placeholder secrets.
80-
# Creates postgres-cred and postgres-crt secrets in NAME_SPACE_RUNTIME.
81-
# IMPORTANT: Must be called AFTER namespace is created but BEFORE operator deployment.
82-
namespace::configure "${NAME_SPACE_POSTGRES_DB}"
83-
if configure_external_postgres_db "${NAME_SPACE_RUNTIME}"; then
84-
postgres_ready=true
85-
# Add RHDH_RUNTIME_URL to postgres-cred (rds-app-config.yaml references it for baseUrl).
86-
# configure_external_postgres_db creates postgres-cred with POSTGRES_* keys only.
87-
local runtime_url_b64
88-
runtime_url_b64=$(common::base64_encode "${runtime_url}")
89-
oc patch secret postgres-cred -n "${NAME_SPACE_RUNTIME}" \
90-
--type=json \
91-
-p "[{\"op\":\"add\",\"path\":\"/data/RHDH_RUNTIME_URL\",\"value\":\"${runtime_url_b64}\"}]"
92-
else
93-
log::warn "External PostgreSQL setup failed; falling back to placeholder secrets (schema-mode tests will skip)"
94-
create_postgres_cred_secret "${NAME_SPACE_RUNTIME}" "tmp" "tmp" "RHDH_RUNTIME_URL=${runtime_url}"
95-
oc apply -f "$DIR/resources/postgres-db/postgres-crt.yaml" -n "${NAME_SPACE_RUNTIME}"
96-
fi
97-
98-
config::create_app_config_map "$DIR/resources/postgres-db/rds-app-config.yaml" "${NAME_SPACE_RUNTIME}"
99-
config::create_dynamic_plugins_config "${DIR}/resources/postgres-db/values-showcase-postgres.yaml" "/tmp/configmap-dynamic-plugins-runtime.yaml"
100-
oc apply -f /tmp/configmap-dynamic-plugins-runtime.yaml -n "${NAME_SPACE_RUNTIME}"
101-
deploy_rhdh_operator "${NAME_SPACE_RUNTIME}" "${DIR}/resources/rhdh-operator/rhdh-start-runtime.yaml" "true"
102-
103-
# Configure schema-mode environment variables (opt-in: tests skip if not configured).
104-
# Only attempt if external PostgreSQL was set up successfully.
105-
if [[ "${postgres_ready}" == "true" ]]; then
106-
if configure_schema_mode_runtime_env "${NAME_SPACE_RUNTIME}" "${RELEASE_NAME}" operator; then
107-
log::info "Schema-mode environment configured successfully; schema-mode tests will run"
108-
else
109-
log::warn "Schema-mode environment not configured; schema-mode tests will skip (this is expected if PostgreSQL is not available)"
110-
fi
111-
fi
112-
11380
testing::run_tests "${RELEASE_NAME}" "${NAME_SPACE_RUNTIME}" "${PW_PROJECT_SHOWCASE_RUNTIME}" "${runtime_url}" || true
11481
}
11582

.ci/pipelines/lib/schema-mode-env.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,14 @@ configure_schema_mode_runtime_env() {
2424
local forward_via_pod=0
2525
local rhdh_psql_svc_name="redhat-developer-hub-postgresql"
2626

27-
local -a helm_svc_candidates=(
27+
# Service candidates: Helm sub-chart pattern first, then operator pattern
28+
local -a svc_candidates=(
2829
"${release_name}-postgresql"
2930
"${rhdh_psql_svc_name}"
31+
"backstage-psql-${release_name}"
3032
)
3133
local hsvc
32-
for hsvc in "${helm_svc_candidates[@]}"; do
34+
for hsvc in "${svc_candidates[@]}"; do
3335
if oc get svc "${hsvc}" -n "${runtime_namespace}" &> /dev/null; then
3436
postgres_service="${hsvc}"
3537
forward_namespace="${runtime_namespace}"
@@ -38,9 +40,11 @@ configure_schema_mode_runtime_env() {
3840
done
3941

4042
if [[ -n "${postgres_service}" ]]; then
43+
# Secret candidates: Helm pattern first, then operator pattern
4144
local -a secret_candidates=(
4245
"${release_name}-postgresql"
4346
"${rhdh_psql_svc_name}"
47+
"backstage-psql-secret-${release_name}"
4448
"postgres-cred"
4549
)
4650
local sec
@@ -49,6 +53,9 @@ configure_schema_mode_runtime_env() {
4953
continue
5054
fi
5155
admin_password=$(oc get secret "${sec}" -n "${runtime_namespace}" -o jsonpath='{.data.postgres-password}' 2> /dev/null | base64 -d || true)
56+
if [[ -z "${admin_password}" ]]; then
57+
admin_password=$(oc get secret "${sec}" -n "${runtime_namespace}" -o jsonpath='{.data.POSTGRESQL_ADMIN_PASSWORD}' 2> /dev/null | base64 -d || true)
58+
fi
5259
if [[ -z "${admin_password}" ]]; then
5360
admin_password=$(oc get secret "${sec}" -n "${runtime_namespace}" -o jsonpath='{.data.POSTGRES_PASSWORD}' 2> /dev/null | base64 -d || true)
5461
fi

.ci/pipelines/resources/postgres-db/rds-app-config.yaml

Lines changed: 0 additions & 24 deletions
This file was deleted.

.ci/pipelines/resources/postgres-db/values-showcase-postgres.yaml

Lines changed: 0 additions & 90 deletions
This file was deleted.

.ci/pipelines/resources/rhdh-operator/rhdh-start-runtime.yaml

Lines changed: 0 additions & 51 deletions
This file was deleted.

.ci/pipelines/utils.sh

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ configure_external_postgres_db() {
260260
fi
261261

262262
# Create postgres-crt secret for Backstage deployment (Helm/Operator)
263-
# This secret is referenced by rhdh-start-runtime.yaml and values-showcase-postgres.yaml
263+
# This secret is referenced by RBAC deployment values and operator CRs
264264
if ! oc create secret generic postgres-crt \
265265
--from-file=postgres-crt.pem=postgres-ca \
266266
--dry-run=client -o yaml | oc apply -f - --namespace="${project}"; then
@@ -433,7 +433,7 @@ cluster_setup_k8s_helm() {
433433
# Functions: base_deployment, rbac_deployment, initiate_deployments,
434434
# base_deployment_osd_gcp, rbac_deployment_osd_gcp, initiate_deployments_osd_gcp,
435435
# initiate_upgrade_base_deployments, initiate_upgrade_deployments,
436-
# initiate_runtime_deployment, initiate_sanity_plugin_checks_deployment,
436+
# initiate_sanity_plugin_checks_deployment,
437437
# apply_yaml_files, deploy_test_backstage_customization_provider,
438438
# deploy_redis_cache, configure_external_postgres_db
439439
# ==============================================================================
@@ -650,22 +650,6 @@ initiate_upgrade_deployments() {
650650
save_all_pod_logs "$namespace"
651651
}
652652

653-
initiate_runtime_deployment() {
654-
local release_name=$1
655-
local namespace=$2
656-
namespace::configure "${namespace}"
657-
helm::uninstall "${namespace}" "${release_name}"
658-
659-
oc apply -f "$DIR/resources/postgres-db/dynamic-plugins-root-PVC.yaml" -n "${namespace}"
660-
661-
# shellcheck disable=SC2046
662-
helm upgrade -i "${release_name}" -n "${namespace}" \
663-
"${HELM_CHART_URL}" --version "${CHART_VERSION}" \
664-
-f "$DIR/resources/postgres-db/values-showcase-postgres.yaml" \
665-
--set global.clusterRouterBase="${K8S_CLUSTER_ROUTER_BASE}" \
666-
$(helm::get_image_params)
667-
}
668-
669653
initiate_sanity_plugin_checks_deployment() {
670654
local release_name=$1
671655
local name_space_sanity_plugins_check=$2

e2e-tests/package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
"showcase-rbac-k8s": "playwright test --project=showcase-rbac-k8s",
1111
"showcase-operator": "playwright test --project=showcase-operator",
1212
"showcase-operator-rbac": "playwright test --project=showcase-operator-rbac",
13-
"showcase-runtime-db": "playwright test --project=showcase-runtime-db",
1413
"showcase-runtime": "playwright test --project=showcase-runtime",
1514
"showcase-upgrade": "playwright test --project=showcase-upgrade",
1615
"showcase-auth-providers": "playwright test --project=showcase-auth-providers",
@@ -40,8 +39,7 @@
4039
"octokit": "4.1.4",
4140
"pg": "8.22.0",
4241
"uuid": "14.0.0",
43-
"winston": "3.14.2",
44-
"yaml": "2.9.0"
42+
"winston": "3.14.2"
4543
},
4644
"devDependencies": {
4745
"@axe-core/playwright": "4.11.3",

e2e-tests/playwright.config.ts

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -171,21 +171,19 @@ export default defineConfig({
171171
dependencies: [PW_PROJECT.SMOKE_TEST],
172172
testMatch: ["**/playwright/e2e/**/*-rbac.spec.ts"],
173173
},
174-
{
175-
name: PW_PROJECT.SHOWCASE_RUNTIME_DB,
176-
workers: 1,
177-
testMatch: [
178-
"**/playwright/e2e/external-database/verify-tls-config-with-external-rds.spec.ts",
179-
"**/playwright/e2e/external-database/verify-tls-config-with-external-azure-db.spec.ts",
180-
],
181-
},
182174
{
183175
name: PW_PROJECT.SHOWCASE_RUNTIME,
184176
workers: 1,
185-
dependencies: [PW_PROJECT.SHOWCASE_RUNTIME_DB],
177+
// Runtime tests restart the RHDH deployment (ConfigMap changes,
178+
// external DB reconfiguration, schema-mode setup). Each restart
179+
// takes ~60-90 s on a typical cluster, so the default 90 s global
180+
// timeout is insufficient. 10 minutes gives comfortable headroom.
181+
timeout: 10 * 60 * 1000,
186182
testMatch: [
187183
"**/playwright/e2e/configuration-test/config-map.spec.ts",
188184
"**/playwright/e2e/plugin-division-mode-schema/verify-schema-mode.spec.ts",
185+
"**/playwright/e2e/external-database/verify-tls-config-with-external-rds.spec.ts",
186+
"**/playwright/e2e/external-database/verify-tls-config-with-external-azure-db.spec.ts",
189187
],
190188
},
191189

0 commit comments

Comments
 (0)