Commit ec9fccf
Migrate test/e2e-oidc to OpenShift Tests Extension framework
Complete migration of OIDC authentication tests to OTE framework with
comprehensive test coverage including all 6 sub-tests from master branch.
Changes:
* cmd/cluster-authentication-operator-tests-ext/main.go:
- Add e2e-oidc import for OTE registration
- Fix serial suite qualifier to exclude [Disruptive] tests
* test/e2e-oidc/external_oidc.go: NEW - Complete test implementation
- Ginkgo v2 registration with OTE tags: [OIDC][Serial][Disruptive][Timeout:3h]
- All 6 sub-tests migrated from master branch:
1. auth-config cm deletion when type not OIDC
2. invalid CEL expression rejects admission (2 variants)
3. invalid OIDC config degrades operator (2 variants)
4. OIDC rollout successful (4 username/prefix variants)
5. auth-config cm overwrite when type OIDC
6. unknown username claim breaks authentication
- All 4 types migrated: oidcAuthResponse, expectedClaims, jwks, testClient
- All 22 helper and validation functions migrated
- Dual-mode pattern: testing.TB interface for Go test + Ginkgo compatibility
* test/e2e-oidc/external_oidc_test.go:
- Simplified to Go test wrapper for backward compatibility
- Calls shared testExternalOIDCWithKeycloak function
* test/library/waits.go:
- Update function signatures to accept testing.TB for dual-mode support
Migration details:
- Convert from t.Run() nested structure to flat sequential Ginkgo tests
- Update all function signatures from *testing.T to testing.TB
- Maintain 100% parity with master branch functionality
- Package name: e2e -> e2e_oidc
Test coverage: 100%
- 6/6 sub-tests migrated
- 4/4 types migrated
- 22/22 functions migrated
Verification:
✅ All unit tests pass (21 packages)
✅ Test binary compiles successfully (98MB)
✅ Code formatted with gofmt
✅ Dependencies vendored and tidied
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent e35c554 commit ec9fccf
5 files changed
Lines changed: 1282 additions & 1141 deletions
File tree
- cmd/cluster-authentication-operator-tests-ext
- test
- e2e-oidc
- library
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
75 | 76 | | |
76 | 77 | | |
77 | 78 | | |
| 79 | + | |
78 | 80 | | |
79 | 81 | | |
80 | 82 | | |
81 | 83 | | |
82 | | - | |
| 84 | + | |
83 | 85 | | |
84 | 86 | | |
85 | 87 | | |
| |||
0 commit comments