client-go/metadata/fake: sets opts.Watch to true

Kubernetes-commit: 12d67506661cfc3e16a769ded834f5d08dba40c9
This commit is contained in:
Lukasz Szaszkiewicz 2025-07-24 13:50:05 +02:00 committed by Kubernetes Publisher
parent 753cfe1811
commit fcbe18a69a

View File

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