Skip to content

Commit 4468565

Browse files
authored
Merge pull request kubernetes#130470 from p0lyn0mial/upstream-fake-client-opts-watch
client-go/gentype/fake: sets opts.Watch true
2 parents 74cb75c + f73f6fd commit 4468565

File tree

1 file changed

+1
-0
lines changed
  • staging/src/k8s.io/client-go/gentype

1 file changed

+1
-0
lines changed

staging/src/k8s.io/client-go/gentype/fake.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ func (l *alsoFakeLister[T, L]) List(ctx context.Context, opts metav1.ListOptions
183183

184184
// Watch returns a watch.Interface that watches the requested resources.
185185
func (c *FakeClient[T]) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
186+
opts.Watch = true
186187
return c.Fake.
187188
InvokesWatch(testing.NewWatchActionWithOptions(c.resource, c.ns, opts))
188189
}

0 commit comments

Comments
 (0)