Regenerate fake clients

Kubernetes-commit: 17ab25b121d05355700f39628d5d45ab3da446f8
This commit is contained in:
Dan Winship 2024-01-20 10:20:43 -05:00 committed by Kubernetes Publisher
parent cf98144093
commit 9f76e9e638

View File

@ -41,22 +41,24 @@ var foosKind = v1alpha1.SchemeGroupVersion.WithKind("Foo")
// Get takes name of the foo, and returns the corresponding foo object, and an error if there is any. // Get takes name of the foo, and returns the corresponding foo object, and an error if there is any.
func (c *FakeFoos) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.Foo, err error) { func (c *FakeFoos) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.Foo, err error) {
emptyResult := &v1alpha1.Foo{}
obj, err := c.Fake. obj, err := c.Fake.
Invokes(testing.NewGetAction(foosResource, c.ns, name), &v1alpha1.Foo{}) Invokes(testing.NewGetAction(foosResource, c.ns, name), emptyResult)
if obj == nil { if obj == nil {
return nil, err return emptyResult, err
} }
return obj.(*v1alpha1.Foo), err return obj.(*v1alpha1.Foo), err
} }
// List takes label and field selectors, and returns the list of Foos that match those selectors. // List takes label and field selectors, and returns the list of Foos that match those selectors.
func (c *FakeFoos) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.FooList, err error) { func (c *FakeFoos) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.FooList, err error) {
emptyResult := &v1alpha1.FooList{}
obj, err := c.Fake. obj, err := c.Fake.
Invokes(testing.NewListAction(foosResource, foosKind, c.ns, opts), &v1alpha1.FooList{}) Invokes(testing.NewListAction(foosResource, foosKind, c.ns, opts), emptyResult)
if obj == nil { if obj == nil {
return nil, err return emptyResult, err
} }
label, _, _ := testing.ExtractFromListOptions(opts) label, _, _ := testing.ExtractFromListOptions(opts)
@ -81,34 +83,37 @@ func (c *FakeFoos) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interf
// Create takes the representation of a foo and creates it. Returns the server's representation of the foo, and an error, if there is any. // Create takes the representation of a foo and creates it. Returns the server's representation of the foo, and an error, if there is any.
func (c *FakeFoos) Create(ctx context.Context, foo *v1alpha1.Foo, opts v1.CreateOptions) (result *v1alpha1.Foo, err error) { func (c *FakeFoos) Create(ctx context.Context, foo *v1alpha1.Foo, opts v1.CreateOptions) (result *v1alpha1.Foo, err error) {
emptyResult := &v1alpha1.Foo{}
obj, err := c.Fake. obj, err := c.Fake.
Invokes(testing.NewCreateAction(foosResource, c.ns, foo), &v1alpha1.Foo{}) Invokes(testing.NewCreateAction(foosResource, c.ns, foo), emptyResult)
if obj == nil { if obj == nil {
return nil, err return emptyResult, err
} }
return obj.(*v1alpha1.Foo), err return obj.(*v1alpha1.Foo), err
} }
// Update takes the representation of a foo and updates it. Returns the server's representation of the foo, and an error, if there is any. // Update takes the representation of a foo and updates it. Returns the server's representation of the foo, and an error, if there is any.
func (c *FakeFoos) Update(ctx context.Context, foo *v1alpha1.Foo, opts v1.UpdateOptions) (result *v1alpha1.Foo, err error) { func (c *FakeFoos) Update(ctx context.Context, foo *v1alpha1.Foo, opts v1.UpdateOptions) (result *v1alpha1.Foo, err error) {
emptyResult := &v1alpha1.Foo{}
obj, err := c.Fake. obj, err := c.Fake.
Invokes(testing.NewUpdateAction(foosResource, c.ns, foo), &v1alpha1.Foo{}) Invokes(testing.NewUpdateAction(foosResource, c.ns, foo), emptyResult)
if obj == nil { if obj == nil {
return nil, err return emptyResult, err
} }
return obj.(*v1alpha1.Foo), err return obj.(*v1alpha1.Foo), err
} }
// UpdateStatus was generated because the type contains a Status member. // UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeFoos) UpdateStatus(ctx context.Context, foo *v1alpha1.Foo, opts v1.UpdateOptions) (*v1alpha1.Foo, error) { func (c *FakeFoos) UpdateStatus(ctx context.Context, foo *v1alpha1.Foo, opts v1.UpdateOptions) (result *v1alpha1.Foo, err error) {
emptyResult := &v1alpha1.Foo{}
obj, err := c.Fake. obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(foosResource, "status", c.ns, foo), &v1alpha1.Foo{}) Invokes(testing.NewUpdateSubresourceAction(foosResource, "status", c.ns, foo), emptyResult)
if obj == nil { if obj == nil {
return nil, err return emptyResult, err
} }
return obj.(*v1alpha1.Foo), err return obj.(*v1alpha1.Foo), err
} }
@ -131,11 +136,12 @@ func (c *FakeFoos) DeleteCollection(ctx context.Context, opts v1.DeleteOptions,
// Patch applies the patch and returns the patched foo. // Patch applies the patch and returns the patched foo.
func (c *FakeFoos) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.Foo, err error) { func (c *FakeFoos) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.Foo, err error) {
emptyResult := &v1alpha1.Foo{}
obj, err := c.Fake. obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(foosResource, c.ns, name, pt, data, subresources...), &v1alpha1.Foo{}) Invokes(testing.NewPatchSubresourceAction(foosResource, c.ns, name, pt, data, subresources...), emptyResult)
if obj == nil { if obj == nil {
return nil, err return emptyResult, err
} }
return obj.(*v1alpha1.Foo), err return obj.(*v1alpha1.Foo), err
} }