feat(test): ui e2e testing, w/ pr cluster#1756
Conversation
|
A single node development cluster (infra-pr-1756) was allocated in production infra for this PR. CI will attempt to deploy 🔌 You can connect to this cluster with: 🛠️ And pull infractl from the deployed dev infra-server with: 🚲 You can then use the dev infra instance e.g.: Further Development☕ If you make changes, you can commit and push and CI will take care of updating the development cluster. 🚀 If you only modify configuration (chart/infra-server/configuration) or templates (chart/infra-server/{static,templates}), you can get a faster update with: LogsLogs for the development infra depending on your @redhat.com authuser: Or: |
322676b to
9cfde1d
Compare
This commit enables UI E2E tests to run against ephemeral GKE clusters
in GitHub Actions, similar to how Go E2E tests work.
Changes:
1. **TEST_MODE deployment support**:
- Fix Helm template conditional in secrets.yaml to prevent duplicate
secret creation when testMode=true
- Generate self-signed certificates at deployment time for TEST_MODE
- Delete and recreate secrets to force correct template application
- Add test-mode-values.yaml to explicitly set testMode=true
2. **Session secret handling**:
- Generate random session secrets for PR cluster deployments
- Pass session secret from deploy job to UI E2E test job via outputs
- Update Cypress commands to read SESSION_SECRET from environment
- Update Makefile to generate and display session secret for local dev
3. **Runtime fixes**:
- Handle invalid GCS credentials gracefully in TEST_MODE
- Add wait for cluster readiness before deployment
4. **Test improvements**:
- Add API error logging to Cypress tests for debugging
- Use dynamic session secrets instead of hardcoded local-dev secret
- Run UI E2E tests before Go E2E tests (UI tests are faster)
- Go E2E tests use port-forward approach like PR 1735
This allows UI E2E tests to authenticate and run against PR clusters
that don't have production secrets, enabling automated UI testing in CI.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
9cfde1d to
9149c97
Compare
Add 'if: success() || failure()' to ui-e2e-test-pr-cluster job so it runs even when deploy-and-test fails (due to Go e2e test failures). This allows us to: - See Go e2e failures as RED in GitHub UI (shows real status) - Still run and test UI E2E functionality independently - Get results for both test suites
Don't create invalid empty Signer struct in TEST_MODE. Instead, leave
gcsSigner as nil which is the proper way to indicate GCS signing is
disabled.
The previous approach of creating &signer.Signer{} was causing workflow
creation failures in go e2e tests.
verify the pr cluster deploy auth fails for cypress