mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-08-08 23:37:11 +00:00
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.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user