mirror of
https://github.com/kubernetes/client-go.git
synced 2025-08-09 11:17:32 +00:00
client-go/dynamic/fake: sets opts.Watch true
Kubernetes-commit: b97decb7d918083e97beb7ff4e5e2052b6e63220
This commit is contained in:
parent
a052c014c7
commit
aca441f80e
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user