@@ -81,8 +81,8 @@ func TestServiceAccountReconciliation(t *testing.T) {
8181 }{
8282 {
8383 name : "successful apply when not found" ,
84- preReq : func (r * Reconciler , m * fakes.FakeCtrlClient ) {
85- m .ExistsCalls (func (ctx context.Context , key client.ObjectKey , obj client.Object ) (bool , error ) {
84+ preReq : func (_ * Reconciler , m * fakes.FakeCtrlClient ) {
85+ m .ExistsCalls (func (_ context.Context , key client.ObjectKey , obj client.Object ) (bool , error ) {
8686 return false , nil
8787 })
8888 },
@@ -92,7 +92,7 @@ func TestServiceAccountReconciliation(t *testing.T) {
9292 {
9393 name : "skip apply when existing matches desired" ,
9494 preReq : func (r * Reconciler , m * fakes.FakeCtrlClient ) {
95- m .ExistsCalls (func (ctx context.Context , key client.ObjectKey , obj client.Object ) (bool , error ) {
95+ m .ExistsCalls (func (_ context.Context , key client.ObjectKey , obj client.Object ) (bool , error ) {
9696 sa := r .getServiceAccountObject (testResourceLabels (), testResourceAnnotations ())
9797 sa .DeepCopyInto (obj .(* corev1.ServiceAccount ))
9898 return true , nil
@@ -104,7 +104,7 @@ func TestServiceAccountReconciliation(t *testing.T) {
104104 {
105105 name : "apply when existing has label drift" ,
106106 preReq : func (r * Reconciler , m * fakes.FakeCtrlClient ) {
107- m .ExistsCalls (func (ctx context.Context , key client.ObjectKey , obj client.Object ) (bool , error ) {
107+ m .ExistsCalls (func (_ context.Context , key client.ObjectKey , obj client.Object ) (bool , error ) {
108108 sa := r .getServiceAccountObject (testResourceLabels (), testResourceAnnotations ())
109109 sa .Labels ["app.kubernetes.io/instance" ] = "modified-value"
110110 sa .DeepCopyInto (obj .(* corev1.ServiceAccount ))
@@ -144,7 +144,7 @@ func TestServiceAccountReconciliation(t *testing.T) {
144144 },
145145 {
146146 name : "exists error propagates" ,
147- preReq : func (r * Reconciler , m * fakes.FakeCtrlClient ) {
147+ preReq : func (_ * Reconciler , m * fakes.FakeCtrlClient ) {
148148 m .ExistsCalls (func (ctx context.Context , key client.ObjectKey , obj client.Object ) (bool , error ) {
149149 return false , errTestClient
150150 })
@@ -155,7 +155,7 @@ func TestServiceAccountReconciliation(t *testing.T) {
155155 },
156156 {
157157 name : "patch error propagates" ,
158- preReq : func (r * Reconciler , m * fakes.FakeCtrlClient ) {
158+ preReq : func (_ * Reconciler , m * fakes.FakeCtrlClient ) {
159159 m .ExistsCalls (func (ctx context.Context , key client.ObjectKey , obj client.Object ) (bool , error ) {
160160 return false , nil
161161 })
0 commit comments