@@ -52,7 +52,7 @@ func TestCreateOrApplyCertificates(t *testing.T) {
5252 }
5353 return nil
5454 })
55- m .ExistsCalls (func (ctx context.Context , ns types.NamespacedName , obj client.Object ) (bool , error ) {
55+ m .ExistsCalls (func (_ context.Context , _ types.NamespacedName , obj client.Object ) (bool , error ) {
5656 switch o := obj .(type ) {
5757 case * certmanagerv1.Certificate :
5858 cert := testCertificate ()
@@ -61,7 +61,7 @@ func TestCreateOrApplyCertificates(t *testing.T) {
6161 }
6262 return true , nil
6363 })
64- m .UpdateWithRetryCalls (func (ctx context.Context , obj client.Object , opts ... client.UpdateOption ) error {
64+ m .UpdateWithRetryCalls (func (_ context.Context , obj client.Object , _ ... client.UpdateOption ) error {
6565 switch obj .(type ) {
6666 case * certmanagerv1.Certificate :
6767 return errTestClient
@@ -74,15 +74,15 @@ func TestCreateOrApplyCertificates(t *testing.T) {
7474 {
7575 name : "reconciliation of certificate which already exists in expected state" ,
7676 preReq : func (_ * Reconciler , m * fakes.FakeCtrlClient ) {
77- m .GetCalls (func (ctx context.Context , ns types.NamespacedName , obj client.Object ) error {
77+ m .GetCalls (func (_ context.Context , _ types.NamespacedName , obj client.Object ) error {
7878 switch o := obj .(type ) {
7979 case * v1alpha1.IstioCSR :
8080 istiocsr := testIstioCSR ()
8181 istiocsr .DeepCopyInto (o )
8282 }
8383 return nil
8484 })
85- m .ExistsCalls (func (ctx context.Context , ns types.NamespacedName , obj client.Object ) (bool , error ) {
85+ m .ExistsCalls (func (_ context.Context , _ types.NamespacedName , obj client.Object ) (bool , error ) {
8686 switch o := obj .(type ) {
8787 case * certmanagerv1.Certificate :
8888 cert := testCertificate ()
@@ -94,23 +94,23 @@ func TestCreateOrApplyCertificates(t *testing.T) {
9494 },
9595 {
9696 name : "reconciliation of certificate creation fails" ,
97- preReq : func (r * Reconciler , m * fakes.FakeCtrlClient ) {
98- m .GetCalls (func (ctx context.Context , ns types.NamespacedName , obj client.Object ) error {
97+ preReq : func (_ * Reconciler , m * fakes.FakeCtrlClient ) {
98+ m .GetCalls (func (_ context.Context , _ types.NamespacedName , obj client.Object ) error {
9999 switch o := obj .(type ) {
100100 case * v1alpha1.IstioCSR :
101101 istiocsr := testIstioCSR ()
102102 istiocsr .DeepCopyInto (o )
103103 }
104104 return nil
105105 })
106- m .ExistsCalls (func (ctx context.Context , ns types.NamespacedName , obj client.Object ) (bool , error ) {
106+ m .ExistsCalls (func (_ context.Context , _ types.NamespacedName , obj client.Object ) (bool , error ) {
107107 switch obj .(type ) {
108108 case * certmanagerv1.Certificate :
109109 return false , nil
110110 }
111111 return true , nil
112112 })
113- m .CreateCalls (func (ctx context.Context , obj client.Object , opts ... client.CreateOption ) error {
113+ m .CreateCalls (func (_ context.Context , obj client.Object , _ ... client.CreateOption ) error {
114114 switch obj .(type ) {
115115 case * certmanagerv1.Certificate :
116116 return errTestClient
@@ -122,8 +122,8 @@ func TestCreateOrApplyCertificates(t *testing.T) {
122122 },
123123 {
124124 name : "reconciliation of certificate when revisions are configured" ,
125- preReq : func (r * Reconciler , m * fakes.FakeCtrlClient ) {
126- m .GetCalls (func (ctx context.Context , ns types.NamespacedName , obj client.Object ) error {
125+ preReq : func (_ * Reconciler , m * fakes.FakeCtrlClient ) {
126+ m .GetCalls (func (_ context.Context , _ types.NamespacedName , obj client.Object ) error {
127127 switch o := obj .(type ) {
128128 case * v1alpha1.IstioCSR :
129129 istiocsr := testIstioCSR ()
@@ -136,8 +136,8 @@ func TestCreateOrApplyCertificates(t *testing.T) {
136136 },
137137 {
138138 name : "reconciliation of certificate when certificate duration not configured" ,
139- preReq : func (r * Reconciler , m * fakes.FakeCtrlClient ) {
140- m .GetCalls (func (ctx context.Context , ns types.NamespacedName , obj client.Object ) error {
139+ preReq : func (_ * Reconciler , m * fakes.FakeCtrlClient ) {
140+ m .GetCalls (func (_ context.Context , _ types.NamespacedName , obj client.Object ) error {
141141 switch o := obj .(type ) {
142142 case * v1alpha1.IstioCSR :
143143 istiocsr := testIstioCSR ()
@@ -150,8 +150,8 @@ func TestCreateOrApplyCertificates(t *testing.T) {
150150 },
151151 {
152152 name : "reconciliation of certificate when certificate RenewBefore not configured" ,
153- preReq : func (r * Reconciler , m * fakes.FakeCtrlClient ) {
154- m .GetCalls (func (ctx context.Context , ns types.NamespacedName , obj client.Object ) error {
153+ preReq : func (_ * Reconciler , m * fakes.FakeCtrlClient ) {
154+ m .GetCalls (func (_ context.Context , _ types.NamespacedName , obj client.Object ) error {
155155 switch o := obj .(type ) {
156156 case * v1alpha1.IstioCSR :
157157 istiocsr := testIstioCSR ()
@@ -164,8 +164,8 @@ func TestCreateOrApplyCertificates(t *testing.T) {
164164 },
165165 {
166166 name : "reconciliation of certificate when certificate PrivateKeyAlgorithm not configured" ,
167- preReq : func (r * Reconciler , m * fakes.FakeCtrlClient ) {
168- m .GetCalls (func (ctx context.Context , ns types.NamespacedName , obj client.Object ) error {
167+ preReq : func (_ * Reconciler , m * fakes.FakeCtrlClient ) {
168+ m .GetCalls (func (_ context.Context , _ types.NamespacedName , obj client.Object ) error {
169169 switch o := obj .(type ) {
170170 case * v1alpha1.IstioCSR :
171171 istiocsr := testIstioCSR ()
@@ -178,8 +178,8 @@ func TestCreateOrApplyCertificates(t *testing.T) {
178178 },
179179 {
180180 name : "reconciliation of certificate when certificate PrivateKeySize not configured" ,
181- preReq : func (r * Reconciler , m * fakes.FakeCtrlClient ) {
182- m .GetCalls (func (ctx context.Context , ns types.NamespacedName , obj client.Object ) error {
181+ preReq : func (_ * Reconciler , m * fakes.FakeCtrlClient ) {
182+ m .GetCalls (func (_ context.Context , _ types.NamespacedName , obj client.Object ) error {
183183 switch o := obj .(type ) {
184184 case * v1alpha1.IstioCSR :
185185 istiocsr := testIstioCSR ()
@@ -192,8 +192,8 @@ func TestCreateOrApplyCertificates(t *testing.T) {
192192 },
193193 {
194194 name : "reconciliation of certificate when certificate PrivateKeySize and PrivateKeyAlgorithm is misconfigured" ,
195- preReq : func (r * Reconciler , m * fakes.FakeCtrlClient ) {
196- m .GetCalls (func (ctx context.Context , ns types.NamespacedName , obj client.Object ) error {
195+ preReq : func (_ * Reconciler , m * fakes.FakeCtrlClient ) {
196+ m .GetCalls (func (_ context.Context , _ types.NamespacedName , obj client.Object ) error {
197197 switch o := obj .(type ) {
198198 case * v1alpha1.IstioCSR :
199199 istiocsr := testIstioCSR ()
0 commit comments