mirror of
https://github.com/distribution/distribution.git
synced 2025-08-19 23:38:13 +00:00
storagedriver/s3: Optimize s3 Delete test cleanup.
This commit is contained in:
parent
5d8fa0ce94
commit
e4af4dc3a6
@ -450,11 +450,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)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user