From 34a446d812c423da7a306963f250f4002dac9be8 Mon Sep 17 00:00:00 2001 From: Jason DeTiberus Date: Wed, 8 Jul 2020 20:27:13 -0400 Subject: [PATCH] [client-go] Fix argument ordering for fake scale client update Fixes the argument order used when calling testing.NewUpdateSubresourceAction within the fake scale client. This was causing the generated action to swap the values of the Namespace and Subresource in the Action. --- staging/src/k8s.io/client-go/scale/fake/client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/staging/src/k8s.io/client-go/scale/fake/client.go b/staging/src/k8s.io/client-go/scale/fake/client.go index 005a4144dcd..4b5392cae90 100644 --- a/staging/src/k8s.io/client-go/scale/fake/client.go +++ b/staging/src/k8s.io/client-go/scale/fake/client.go @@ -60,7 +60,7 @@ func (f *fakeNamespacedScaleClient) Get(ctx context.Context, resource schema.Gro func (f *fakeNamespacedScaleClient) Update(ctx context.Context, resource schema.GroupResource, scale *autoscalingapi.Scale, opts metav1.UpdateOptions) (*autoscalingapi.Scale, error) { obj, err := f.fake. - Invokes(testing.NewUpdateSubresourceAction(resource.WithVersion(""), f.namespace, "scale", scale), &autoscalingapi.Scale{}) + Invokes(testing.NewUpdateSubresourceAction(resource.WithVersion(""), "scale", f.namespace, scale), &autoscalingapi.Scale{}) if err != nil { return nil, err