client-go/dynamic/fake: sets opts.Watch true

Kubernetes-commit: b97decb7d918083e97beb7ff4e5e2052b6e63220
This commit is contained in:
Lukasz Szaszkiewicz 2025-07-22 15:58:22 +02:00 committed by Kubernetes Publisher
parent a052c014c7
commit aca441f80e

View File

@ -405,6 +405,7 @@ func (c *dynamicResourceClient) List(ctx context.Context, opts metav1.ListOption
}
func (c *dynamicResourceClient) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
opts.Watch = true
switch {
case len(c.namespace) == 0:
return c.client.Fake.
@ -413,7 +414,6 @@ func (c *dynamicResourceClient) Watch(ctx context.Context, opts metav1.ListOptio
case len(c.namespace) > 0:
return c.client.Fake.
InvokesWatch(testing.NewWatchAction(c.resource, c.namespace, opts))
}
panic("math broke")