diff --git a/plugins/content/local/store_test.go b/plugins/content/local/store_test.go index 0ce3a9c9c9..0766134672 100644 --- a/plugins/content/local/store_test.go +++ b/plugins/content/local/store_test.go @@ -317,7 +317,7 @@ type checker interface { func generateBlobs(t checker, nblobs, maxsize int64) map[digest.Digest][]byte { blobs := map[digest.Digest][]byte{} - for i := int64(0); i < nblobs; i++ { + for range nblobs { p := make([]byte, randutil.Int63n(maxsize)) if _, err := rand.Read(p); err != nil { diff --git a/plugins/gc/scheduler_test.go b/plugins/gc/scheduler_test.go index 0c606043e7..d58c6839bb 100644 --- a/plugins/gc/scheduler_test.go +++ b/plugins/gc/scheduler_test.go @@ -85,7 +85,7 @@ func TestDeletionThreshold(t *testing.T) { // Increment deletion count 5, checking GC hasn't run in // between each call - for i := 0; i < 5; i++ { + for range 5 { time.Sleep(time.Millisecond) if c := tc.runCount(); c != 0 { t.Fatalf("GC ran unexpectedly")