mirror of
https://github.com/distribution/distribution.git
synced 2025-09-06 09:20:45 +00:00
storagedriver/s3: Optimize s3 Delete test cleanup.
(cherry picked from commit e4af4dc3a6
)
Signed-off-by: Collin Shoop <cshoop@digitalocean.com>
This commit is contained in:
@@ -479,11 +479,11 @@ func TestDelete(t *testing.T) {
|
|||||||
t.Fatalf("cleanup failed: %s", lastErr)
|
t.Fatalf("cleanup failed: %s", lastErr)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
defer cleanup(objs)
|
||||||
|
|
||||||
for _, tc := range tcs {
|
for _, tc := range tcs {
|
||||||
t.Run(tc.name, func(t *testing.T) {
|
t.Run(tc.name, func(t *testing.T) {
|
||||||
objs := init()
|
objs := init()
|
||||||
defer cleanup(objs)
|
|
||||||
|
|
||||||
err := driver.Delete(context.Background(), tc.delete)
|
err := driver.Delete(context.Background(), tc.delete)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user