diff --git a/registry/storage/driver/s3-aws/s3_test.go b/registry/storage/driver/s3-aws/s3_test.go index eb1bbdfd..2e9b5555 100644 --- a/registry/storage/driver/s3-aws/s3_test.go +++ b/registry/storage/driver/s3-aws/s3_test.go @@ -479,11 +479,11 @@ func TestDelete(t *testing.T) { t.Fatalf("cleanup failed: %s", lastErr) } } + defer cleanup(objs) for _, tc := range tcs { t.Run(tc.name, func(t *testing.T) { objs := init() - defer cleanup(objs) err := driver.Delete(context.Background(), tc.delete)