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