From 545526cfe095797c929c9beec1788c6fff351fd4 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Fri, 29 Aug 2025 09:12:14 +0200 Subject: [PATCH] DRA E2E: only check ResourceClaims in the test namespace That was the original intent, but the implementation then ended up checking ResourceClaims in all namespaces. Depending on timing this was merely misleading (showing ResourceClaim changes from a different test running in parallel), but with upcoming CRUD tests which intentionally set an allocation result without a finalizer it breaks the non-CRUD tests when they check the those CRUD ResourceClaims. --- test/e2e/dra/utils/deploy.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/e2e/dra/utils/deploy.go b/test/e2e/dra/utils/deploy.go index cad8709fc42..ef2afa55279 100644 --- a/test/e2e/dra/utils/deploy.go +++ b/test/e2e/dra/utils/deploy.go @@ -149,7 +149,7 @@ func (nodes *Nodes) init(ctx context.Context, f *framework.Framework, minNodes, claimInformer := cache.NewSharedIndexInformer( &cache.ListWatch{ ListWithContextFunc: func(ctx context.Context, options metav1.ListOptions) (runtime.Object, error) { - slices, err := resourceClient.ResourceClaims("").List(ctx, options) + slices, err := resourceClient.ResourceClaims(f.Namespace.Name).List(ctx, options) if err == nil { resourceClaimLogger.Info("Listed ResourceClaims", "resourceAPI", resourceClient.CurrentAPI(), "numClaims", len(slices.Items), "listMeta", slices.ListMeta) } else { @@ -158,7 +158,7 @@ func (nodes *Nodes) init(ctx context.Context, f *framework.Framework, minNodes, return slices, err }, WatchFuncWithContext: func(ctx context.Context, options metav1.ListOptions) (watch.Interface, error) { - w, err := resourceClient.ResourceClaims("").Watch(ctx, options) + w, err := resourceClient.ResourceClaims(f.Namespace.Name).Watch(ctx, options) if err == nil { resourceClaimLogger.Info("Started watching ResourceClaims", "resourceAPI", resourceClient.CurrentAPI()) wrapper := newWatchWrapper(klog.LoggerWithName(resourceClaimLogger, fmt.Sprintf("%d", resourceClaimWatchCounter.Load())), w)