You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test(e2e): add controller-runtime client and DWOC config save/restore
- Add ControllerRuntimeClient() method to test client for accessing CRDs
- Add controllerv1alpha1 to scheme for DWOC access
- Add DWOC save/restore in BeforeAll/AfterAll to prevent config leaks
- Use ginkgo.Ordered to ensure sequential test execution
- Update copyright year to 2026
This prevents config leaks between custom init container tests and ensures
clean state for each test run.
Assisted-by: Claude Sonnet 4.5
Signed-off-by: Oleksii Kurinnyi <okurinny@redhat.com>
**AI Agent Note**: ALWAYS add PVC cleanup to e2e tests to prevent conflicts between test runs, especially in CI environments.
439
+
440
+
**Critical**: DevWorkspaces use a shared PVC (`claim-devworkspace`) that persists after workspace deletion. Without proper cleanup, subsequent tests can fail due to PVC conflicts or stale data.
441
+
442
+
**Pattern**: Use `DeleteDevWorkspaceAndWait` in cleanup blocks:
443
+
444
+
```go
445
+
var_ = ginkgo.Describe("[Test Suite Name]", ginkgo.Ordered, func() {
446
+
defer ginkgo.GinkgoRecover()
447
+
448
+
const workspaceName = "test-workspace"
449
+
450
+
ginkgo.AfterAll(func() {
451
+
// Cleanup workspace and wait for PVC to be fully deleted
452
+
// This prevents PVC conflicts in subsequent tests, especially in CI environments
0 commit comments