chore: add new test structure for pluginDivisionMode: schema#4288
chore: add new test structure for pluginDivisionMode: schema#4288Fortune-Ndlovu wants to merge 47 commits intoredhat-developer:mainfrom
Conversation
Signed-off-by: Fortune-Ndlovu <[email protected]>
PR Reviewer Guide 🔍(Review updated until commit 4a2e099)Here are some key observations to aid the review process:
|
Review Summary by QodoAdd E2E tests for pluginDivisionMode schema mode verification with enhanced Kubernetes diagnostics
WalkthroughsDescription• Adds comprehensive E2E test suites for verifying pluginDivisionMode: schema configuration on both OpenShift Operator and Helm chart deployments • Tests cover database setup, PostgreSQL connectivity, schema creation, and RHDH accessibility with detailed error handling and diagnostics • Enhances PostgreSQL credentials configuration with database parameter support for setting POSTGRES_DB environment variable • Improves Kubernetes client with advanced diagnostics capabilities including pod command execution, container logs, pod events, and replica set status logging • Adds comprehensive documentation for schema mode E2E test setup and execution • Registers new test files in Playwright configuration File Changes1. e2e-tests/playwright/e2e/plugin-division-mode-schema/verify-schema-mode-operator.spec.ts
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||||||
|
This PR is stale because it has been open 7 days with no activity. Remove stale label or comment or this will be closed in 21 days. |
…ere created], [Verify pluginDivisionMode: schema › Verify no separate plugin databases], and [Verify pluginDivisionMode: schema › Verify RHDH is accessible] Signed-off-by: Fortune-Ndlovu <[email protected]>
|
The container image build workflow finished with status: |
Signed-off-by: Fortune-Ndlovu <[email protected]>
Signed-off-by: Fortune-Ndlovu <[email protected]>
Signed-off-by: Fortune-Ndlovu <[email protected]>
|
The container image build workflow finished with status: |
Signed-off-by: Fortune-Ndlovu <[email protected]>
|
The container image build workflow finished with status: |
Signed-off-by: Fortune-Ndlovu <[email protected]>
|
The container image build workflow finished with status: |
|
/test e2e-ocp-helm-nightly |
.ci/pipelines/jobs/ocp-nightly.sh
Outdated
| # shellcheck source=.ci/pipelines/playwright-projects.sh | ||
| source "$DIR"/playwright-projects.sh | ||
|
|
||
| configure_schema_mode_runtime_env() { |
There was a problem hiding this comment.
I see that you already moved this logic to the test files. Is this function needed then?
The Helm nightly job has ⚠ Schema-mode nightly: PostgreSQL service not found in showcase-runtime; schema tests remain opt-in. in the logs.
I guess the function exits before exporting the env vars, which is making the schema mode skipped.
.ci/pipelines/jobs/ocp-operator.sh
Outdated
| # shellcheck source=.ci/pipelines/playwright-projects.sh | ||
| source "$DIR"/playwright-projects.sh | ||
|
|
||
| configure_schema_mode_runtime_env() { |
There was a problem hiding this comment.
This basically duplicates the same configure_schema_mode_runtime_env function for Helm. Can this be moved to a separate file/library, which is then sourced for both?
There was a problem hiding this comment.
#4288 (comment)
The runtime change tests aren't executed on Operator now.
There was a problem hiding this comment.
When the tests are incorporated into nightly job, this doc should be updated with the changes.
e2e-tests/playwright.config.ts
Outdated
| testMatch: [ | ||
| "**/playwright/e2e/external-database/verify-tls-config-with-external-rds.spec.ts", | ||
| "**/playwright/e2e/external-database/verify-tls-config-with-external-azure-db.spec.ts", | ||
| ...(process.env.SCHEMA_MODE_DB_HOST |
…r nightly Signed-off-by: Fortune-Ndlovu <[email protected]>
…r nightly Signed-off-by: Fortune-Ndlovu <[email protected]>
Signed-off-by: Fortune-Ndlovu <[email protected]>
|
/test e2e-ocp-operator-nightly |
|
/test e2e-ocp-helm-nightly |
Signed-off-by: Fortune-Ndlovu <[email protected]>
…+ non-SSL rejection); pending rerun confirmation. Signed-off-by: Fortune-Ndlovu <[email protected]>
|
/test e2e-ocp-operator-nightly |
|
/test e2e-ocp-helm-nightly |
Signed-off-by: Fortune-Ndlovu <[email protected]>
Signed-off-by: Fortune-Ndlovu <[email protected]>
|
/test e2e-ocp-operator-nightly |
|
/test e2e-ocp-helm-nightly |
|
/test e2e-ocp-operator-nightly |
|
/test e2e-ocp-helm-nightly |
The showcase-runtime deployment was failing with "Secret 'postgres-crt' not found" because the secret was never created in the NAME_SPACE_RUNTIME namespace. Changes: - utils.sh: Create postgres-crt secret in configure_external_postgres_db() - ocp-nightly.sh: Call configure_external_postgres_db before initiate_runtime_deployment - ocp-operator.sh: Call configure_external_postgres_db before deploy_rhdh_operator This ensures both postgres-crt and postgres-cred secrets exist before deploying showcase-runtime, which is required by: - values-showcase-postgres.yaml (Helm deployment) - rhdh-start-runtime.yaml (Operator deployment) Fixes the deployment failure that prevented schema-mode tests from running. Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
|
|
@Fortune-Ndlovu: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |



Description
This PR adds E2E coverage for pluginDivisionMode: schema on both Helm and Operator deployments. The tests check that RHDH runs with a restricted DB user (single database, no CREATEDB), that plugin schemas are created in one database instead of separate plugin databases, and that the app stays reachable. Shared setup (DB creation, user hardening, revoking CONNECT on other DBs, grants) lives in
schema-mode-db.ts; Helm- and Operator-specific config (secrets, ConfigMaps, CR patching) stay in the respective specs.The schema-mode specs are included in the e2e suite via SHOWCASE_RUNTIME_DB when
SCHEMA_MODE_DB_HOSTis set, and each spec skips when the job is for the other install method (JOB_NAMEcontains"operator"or"helm") so Helm nightly runs only the Helm spec and Operator nightly only the Operator spec. Tests remain opt-in whenSCHEMA_MODE_*env vars are not set (skip with a clear message), and are ignored in SHOWCASE / SHOWCASE_K8S / SHOWCASE_OPERATOR so the default suite is unchanged. Manual runs use--project=any-testas documented in the README.Which issue(s) does this PR fix
PR acceptance criteria
Please make sure that the following steps are complete:
How to test changes / Special notes to the reviewer