From 6da7217b99e64022cecfd003bc8e0e7c2531c057 Mon Sep 17 00:00:00 2001 From: Collin Shoop Date: Wed, 11 Aug 2021 13:00:06 -0400 Subject: [PATCH] storagedriver/s3: Optimize s3 Delete test cleanup. (cherry picked from commit e4af4dc3a6da6da724e7cff18cf5b6da6ef2a3fd) Signed-off-by: Collin Shoop --- registry/storage/driver/s3-aws/s3_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)