@@ -227,6 +227,7 @@ func TestReconcilerHandleDelete(t *testing.T) {
227
227
228
228
// Continue until instances are healthy.
229
229
var instances []appsv1.StatefulSet
230
+ var ready int32
230
231
assert .NilError (t , wait .Poll (time .Second , Scale (time .Minute ), func () (bool , error ) {
231
232
mustReconcile (t , cluster )
232
233
@@ -242,12 +243,12 @@ func TestReconcilerHandleDelete(t *testing.T) {
242
243
243
244
instances = list .Items
244
245
245
- ready : = int32 (0 )
246
+ ready = int32 (0 )
246
247
for i := range instances {
247
248
ready += instances [i ].Status .ReadyReplicas
248
249
}
249
250
return ready >= test .waitForRunningInstances , nil
250
- }), "expected %v instances to be ready, got:\n %+ v" , test .waitForRunningInstances , instances )
251
+ }), "expected %v instances to be ready, got:\n %v" , test .waitForRunningInstances , ready )
251
252
252
253
if test .beforeDelete != nil {
253
254
test .beforeDelete (t , cluster )
@@ -459,6 +460,7 @@ func TestReconcilerHandleDeleteNamespace(t *testing.T) {
459
460
})
460
461
461
462
var instances []appsv1.StatefulSet
463
+ var ready int32
462
464
assert .NilError (t , wait .Poll (time .Second , Scale (time .Minute ), func () (bool , error ) {
463
465
list := appsv1.StatefulSetList {}
464
466
selector , err := labels .Parse (strings .Join ([]string {
@@ -472,12 +474,12 @@ func TestReconcilerHandleDeleteNamespace(t *testing.T) {
472
474
473
475
instances = list .Items
474
476
475
- ready : = 0
477
+ ready = 0
476
478
for i := range instances {
477
- ready += int ( instances [i ].Status .ReadyReplicas )
479
+ ready += instances [i ].Status .ReadyReplicas
478
480
}
479
481
return ready >= 2 , nil
480
- }), "expected instances to be ready, got:\n %+ v" , instances )
482
+ }), "expected 2 instances to be ready, got:\n %v" , ready )
481
483
482
484
// Delete the namespace.
483
485
assert .NilError (t , cc .Delete (ctx , ns ))
0 commit comments