From bc8c575aaec16fdf31daea5e5b396b1b48e9369b Mon Sep 17 00:00:00 2001 From: "Per G. da Silva" Date: Thu, 2 Jul 2026 11:38:47 +0200 Subject: [PATCH] :seedling: Align ClusterObjectSet e2e cleanup with addedResources pattern Track ClusterObjectSets in addedResources when applied, matching the pattern established for ClusterExtensions in #2783. This removes the special-case cleanup block in ScenarioCleanup and ensures multiple ClusterObjectSets per scenario are all cleaned up correctly. Co-Authored-By: Claude Opus 4.6 (1M context) --- test/e2e/steps/hooks.go | 3 --- test/e2e/steps/steps.go | 1 + 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/test/e2e/steps/hooks.go b/test/e2e/steps/hooks.go index ef56b99a6..159cc7d5b 100644 --- a/test/e2e/steps/hooks.go +++ b/test/e2e/steps/hooks.go @@ -268,9 +268,6 @@ func ScenarioCleanup(ctx context.Context, _ *godog.Scenario, err error) (context } forDeletion := sc.addedResources - if sc.clusterObjectSetName != "" && featureGates[features.BoxcutterRuntime] { - forDeletion = append(forDeletion, resource{name: sc.clusterObjectSetName, kind: "clusterobjectset"}) - } for _, catalogName := range sc.catalogs { forDeletion = append(forDeletion, resource{name: catalogName, kind: "clustercatalog"}) } diff --git a/test/e2e/steps/steps.go b/test/e2e/steps/steps.go index 52aed3a5e..a0145b8ba 100644 --- a/test/e2e/steps/steps.go +++ b/test/e2e/steps/steps.go @@ -476,6 +476,7 @@ func ResourceIsApplied(ctx context.Context, yamlTemplate *godog.DocString) error sc.addedResources = append(sc.addedResources, resource{name: res.GetName(), kind: "clusterextension"}) } else if res.GetKind() == "ClusterObjectSet" { sc.clusterObjectSetName = res.GetName() + sc.addedResources = append(sc.addedResources, resource{name: res.GetName(), kind: "clusterobjectset"}) } else { namespace := res.GetNamespace() if namespace == "" {