Skip to content

Commit e5fbf3d

Browse files
chore(e2e): incorporate tls tests into showcase-runtime (#2271)
rh-pre-commit.version: 2.3.2 rh-pre-commit.check-secrets: ENABLED
1 parent e600906 commit e5fbf3d

File tree

8 files changed

+11
-33
lines changed

8 files changed

+11
-33
lines changed

.ibm/pipelines/env_variables.sh

-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ NAME_SPACE="${NAME_SPACE:-showcase}"
2222
NAME_SPACE_RBAC="${NAME_SPACE_RBAC:-showcase-rbac}"
2323
NAME_SPACE_RUNTIME="${NAME_SPACE_RUNTIME:-showcase-runtime}"
2424
NAME_SPACE_POSTGRES_DB="${NAME_SPACE_POSTGRES_DB:-postgress-external-db}"
25-
NAME_SPACE_RDS="showcase-rds-nightly"
2625
OPERATOR_MANAGER='rhdh-operator'
2726
CHART_VERSION="2.15.2" # Fixed version should be used for release branches.
2827
GITHUB_APP_APP_ID=$(cat /tmp/secrets/GITHUB_APP_3_APP_ID)

.ibm/pipelines/jobs/periodic.sh

+2-21
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ handle_nightly() {
1717
deploy_test_backstage_provider "${NAME_SPACE}"
1818

1919
run_standard_deployment_tests
20-
run_rds_deployment_tests
21-
# run_runtime_config_change_tests
20+
run_runtime_config_change_tests
2221

2322
}
2423

@@ -29,28 +28,10 @@ run_standard_deployment_tests() {
2928
check_and_test "${RELEASE_NAME_RBAC}" "${NAME_SPACE_RBAC}" "${rbac_url}"
3029
}
3130

32-
run_rds_deployment_tests() {
33-
# Only test TLS config with RDS and Change configuration at runtime in nightly jobs
34-
initiate_rds_deployment "${RELEASE_NAME}" "${NAME_SPACE_RDS}"
35-
local rds_url="https://${RELEASE_NAME}-backstage-${NAME_SPACE_RDS}.${K8S_CLUSTER_ROUTER_BASE}"
36-
check_and_test "${RELEASE_NAME}" "${NAME_SPACE_RDS}" "${rds_url}"
37-
}
38-
3931
run_runtime_config_change_tests() {
4032
# Deploy `showcase-runtime` to run tests that require configuration changes at runtime
41-
configure_namespace "${NAME_SPACE_RUNTIME}"
42-
uninstall_helmchart "${NAME_SPACE_RUNTIME}" "${RELEASE_NAME}"
43-
oc apply -f "$DIR/resources/redis-cache/redis-deployment.yaml" --namespace="${NAME_SPACE_RUNTIME}"
44-
33+
initiate_runtime_deployment "${RELEASE_NAME}" "${NAME_SPACE_RUNTIME}"
4534
local runtime_url="https://${RELEASE_NAME}-backstage-${NAME_SPACE_RUNTIME}.${K8S_CLUSTER_ROUTER_BASE}"
46-
47-
apply_yaml_files "${DIR}" "${NAME_SPACE_RUNTIME}" "${runtime_url}"
48-
helm upgrade -i "${RELEASE_NAME}" -n "${NAME_SPACE_RUNTIME}" \
49-
"${HELM_REPO_NAME}/${HELM_IMAGE_NAME}" --version "${CHART_VERSION}" \
50-
-f "${DIR}/value_files/${HELM_CHART_VALUE_FILE_NAME}" \
51-
--set global.clusterRouterBase="${K8S_CLUSTER_ROUTER_BASE}" \
52-
--set upstream.backstage.image.repository="${QUAY_REPO}" \
53-
--set upstream.backstage.image.tag="${TAG_NAME}" \
5435
check_and_test "${RELEASE_NAME}" "${NAME_SPACE_RUNTIME}" "${runtime_url}"
5536
}
5637

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

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ upstream:
1515
tag: next
1616
appConfig:
1717
app:
18+
title: Red Hat Developer Hub
1819
baseUrl: 'https://{{- include "janus-idp.hostname" . }}'
1920
backend:
2021
auth:

.ibm/pipelines/utils.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -786,7 +786,7 @@ initiate_deployments() {
786786
--set upstream.backstage.image.tag="${TAG_NAME}"
787787
}
788788

789-
initiate_rds_deployment() {
789+
initiate_runtime_deployment() {
790790
local release_name=$1
791791
local namespace=$2
792792
configure_namespace "${namespace}"

e2e-tests/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
"showcase-rbac-k8s-ci-nightly": "playwright test --project=showcase-rbac-k8s",
1717
"showcase-operator-nightly": "playwright test --project=showcase-operator",
1818
"showcase-op-rbac-nightly": "playwright test --project=showcase-operator-rbac",
19-
"showcase-rds-nightly": "playwright test --project=postgres-health-check",
2019
"showcase-runtime": "playwright test --project=showcase-runtime",
2120
"showcase-auth-providers": "playwright test --project=showcase-auth-providers --workers 1",
2221
"lint:check": "eslint . --ext .js,.ts",

e2e-tests/playwright.config.ts

+4-6
Original file line numberDiff line numberDiff line change
@@ -163,15 +163,13 @@ export default defineConfig({
163163
"**/playwright/e2e/plugins/bulk-import.spec.ts",
164164
],
165165
},
166-
{
167-
name: "postgres-health-check",
168-
...useCommonDeviceAndViewportConfig,
169-
testMatch: ["**/playwright/e2e/verify-tls-config-health-check.spec.ts"],
170-
},
171166
{
172167
name: "showcase-runtime",
173168
...useCommonDeviceAndViewportConfig,
174-
testMatch: ["**/playwright/e2e/configuration-test/config-map.spec.ts"],
169+
testMatch: [
170+
"**/playwright/e2e/configuration-test/config-map.spec.ts",
171+
"**/playwright/e2e/verify-tls-config-health-check.spec.ts",
172+
],
175173
},
176174
],
177175
});

e2e-tests/playwright/e2e/configuration-test/config-map.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ test.describe.skip("Change app-config at e2e test runtime", () => {
88
test("Verify title change after ConfigMap modification", async ({ page }) => {
99
test.setTimeout(300000); // Increasing to 5 minutes
1010

11-
const configMapName = "app-config-rhdh";
12-
const namespace = process.env.NAME_SPACE || "showcase-ci-nightly";
11+
const configMapName = "rhdh-backstage-app-config";
12+
const namespace = process.env.NAME_SPACE_RUNTIME || "showcase-runtime";
1313
const deploymentName = "rhdh-backstage";
1414

1515
const kubeUtils = new KubeClient();

e2e-tests/playwright/e2e/verify-tls-config-health-check.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { KubeClient } from "../utils/kube-client";
44

55
test.describe
66
.serial("Verify TLS configuration with Postgres DB health check", () => {
7-
const namespace = process.env.NAME_SPACE_RDS;
7+
const namespace = process.env.NAME_SPACE_RUNTIME || "showcase-runtime";
88
const deploymentName = "rhdh-backstage";
99
const secretName = "postgres-cred";
1010
const hostLatest2 = Buffer.from(process.env.RDS_2_HOST).toString("base64");

0 commit comments

Comments
 (0)