You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
t.Errorf("lease counter did not return fallback count on lister error (got: %v, want: 0", got)
297
+
t.Errorf("lease counter did not return fallback count on leaseClient error (got: %v, want: 0)", got)
288
298
}
289
299
290
-
// Second call should return the actual count (3) upon lister success.
300
+
// Second call should return the actual count (3) upon leaseClient success.
301
+
callShouldFail=false
291
302
actualCount:=3
292
-
lister.err=nil
293
-
got=counter.Count()
303
+
got=counter.Count(ctx)
294
304
ifgot!=actualCount {
295
-
t.Errorf("lease counter did not return actual count on lister success (got: %v, want: %v)", got, actualCount)
305
+
t.Errorf("lease counter did not return actual count on leaseClient success (got: %v, want: %v)", got, actualCount)
296
306
}
297
307
298
-
// Third call should return updated fallback count (3) upon lister failure.
299
-
lister.err=fmt.Errorf("dummy lister error")
300
-
lister.leases=append(lister.leases, newLeaseFromTemplate(validLease)) // Change actual count just in case.
301
-
got=counter.Count()
308
+
// Third call should return updated fallback count (3) upon leaseClient failure.
309
+
callShouldFail=true
310
+
got=counter.Count(ctx)
302
311
ifgot!=actualCount {
303
-
t.Errorf("lease counter did not update fallback count after lister success, returned incorrect count on subsequent lister error (got: %v, want: %v)", got, actualCount)
312
+
t.Errorf("lease counter did not update fallback count after leaseClient success, returned incorrect count on subsequent leaseClient error (got: %v, want: %v)", got, actualCount)
0 commit comments