@@ -221,7 +221,7 @@ func TestRecreate_deploymentPreHookFail(t *testing.T) {
221
221
}
222
222
223
223
if len (controllerClient .scaleEvents ) > 0 {
224
- t .Fatalf ("unexpected scaling events: %d " , controllerClient .scaleEvents )
224
+ t .Fatalf ("unexpected scaling events: %v " , controllerClient .scaleEvents )
225
225
}
226
226
}
227
227
@@ -253,7 +253,7 @@ func TestRecreate_deploymentMidHookSuccess(t *testing.T) {
253
253
}
254
254
255
255
if len (controllerClient .scaleEvents ) > 0 {
256
- t .Fatalf ("unexpected scaling events: %d " , controllerClient .scaleEvents )
256
+ t .Fatalf ("unexpected scaling events: %v " , controllerClient .scaleEvents )
257
257
}
258
258
}
259
259
@@ -405,10 +405,10 @@ func TestRecreate_acceptorSuccessWithColdCaches(t *testing.T) {
405
405
if len (controllerClient .scaleEvents ) != 2 {
406
406
t .Fatalf ("expected 2 scale calls, got %d" , len (controllerClient .scaleEvents ))
407
407
}
408
- if r := controllerClient .scaleEvents [0 ]; r .Spec .Replicas != 1 {
408
+ if r := controllerClient .scaleEvents [0 ].Spec .Replicas ; r != 1 {
409
409
t .Errorf ("expected first scale event to be 1 replica, got %d" , r )
410
410
}
411
- if r := controllerClient .scaleEvents [1 ]; r .Spec .Replicas != 2 {
411
+ if r := controllerClient .scaleEvents [1 ].Spec .Replicas ; r != 2 {
412
412
t .Errorf ("expected second scale event to be 2 replica, got %d" , r )
413
413
}
414
414
}
@@ -445,6 +445,6 @@ func TestRecreate_acceptorFail(t *testing.T) {
445
445
t .Fatalf ("expected 1 scale calls, got %d" , len (rcClient .scaleEvents ))
446
446
}
447
447
if r := rcClient .scaleEvents [0 ]; r .Spec .Replicas != 1 {
448
- t .Errorf ("expected first scale event to be 1 replica, got %d " , r )
448
+ t .Errorf ("expected first scale event to be 1 replica, got %v " , r )
449
449
}
450
450
}
0 commit comments