mirror of
https://github.com/kubernetes/client-go.git
synced 2025-07-04 10:46:16 +00:00
regenerate fakes
Kubernetes-commit: 95ad9009c33a664bfbc3f2a9836148f9efbde851
This commit is contained in:
parent
9b46f3224a
commit
2468a89fde
@ -95,9 +95,10 @@ func NewSimpleClientset(objects ...runtime.Object) *Clientset {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fakePtr := testing.Fake{}
|
cs := &Clientset{}
|
||||||
fakePtr.AddReactor("*", "*", testing.ObjectReaction(o))
|
cs.discovery = &fakediscovery.FakeDiscovery{Fake: &cs.Fake}
|
||||||
fakePtr.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) {
|
cs.AddReactor("*", "*", testing.ObjectReaction(o))
|
||||||
|
cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) {
|
||||||
gvr := action.GetResource()
|
gvr := action.GetResource()
|
||||||
ns := action.GetNamespace()
|
ns := action.GetNamespace()
|
||||||
watch, err := o.Watch(gvr, ns)
|
watch, err := o.Watch(gvr, ns)
|
||||||
@ -107,7 +108,7 @@ func NewSimpleClientset(objects ...runtime.Object) *Clientset {
|
|||||||
return true, watch, nil
|
return true, watch, nil
|
||||||
})
|
})
|
||||||
|
|
||||||
return &Clientset{fakePtr, &fakediscovery.FakeDiscovery{Fake: &fakePtr}}
|
return cs
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clientset implements clientset.Interface. Meant to be embedded into a
|
// Clientset implements clientset.Interface. Meant to be embedded into a
|
||||||
|
Loading…
Reference in New Issue
Block a user