mirror of
https://github.com/kubernetes/sample-controller.git
synced 2026-07-15 00:00:09 +08:00
Add support for JSON patch in fake client
Kubernetes-commit: a363b153851326ece7f81f4c1ae0a1ab8700a209
This commit is contained in:
committed by
Kubernetes Publisher
parent
e8109b7ca8
commit
69ec0e4f12
Generated
+244
-240
File diff suppressed because it is too large
Load Diff
@@ -131,7 +131,7 @@ func (c *FakeFoos) DeleteCollection(options *v1.DeleteOptions, listOptions v1.Li
|
|||||||
// Patch applies the patch and returns the patched foo.
|
// Patch applies the patch and returns the patched foo.
|
||||||
func (c *FakeFoos) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Foo, err error) {
|
func (c *FakeFoos) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Foo, err error) {
|
||||||
obj, err := c.Fake.
|
obj, err := c.Fake.
|
||||||
Invokes(testing.NewPatchSubresourceAction(foosResource, c.ns, name, data, subresources...), &v1alpha1.Foo{})
|
Invokes(testing.NewPatchSubresourceAction(foosResource, c.ns, name, pt, data, subresources...), &v1alpha1.Foo{})
|
||||||
|
|
||||||
if obj == nil {
|
if obj == nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|||||||
Reference in New Issue
Block a user