storagedriver/s3: Optimize s3 Delete test cleanup.

(cherry picked from commit e4af4dc3a6da6da724e7cff18cf5b6da6ef2a3fd)
Signed-off-by: Collin Shoop <cshoop@digitalocean.com>
pull/3479/head
Collin Shoop 2021-08-11 13:00:06 -04:00
parent 03f9eb3a18
commit 6da7217b99
1 changed files with 1 additions and 1 deletions

View File

@ -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)