mirror of
https://github.com/restic/restic.git
synced 2025-10-09 07:33:53 +00:00
test: Use testing.T.Cleanup to remove tempdirs
This commit is contained in:
@@ -112,9 +112,7 @@ func TestBackendREST(t *testing.T) {
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
defer cancel()
|
||||
|
||||
dir, cleanup := rtest.TempDir(t)
|
||||
defer cleanup()
|
||||
|
||||
dir := rtest.TempDir(t)
|
||||
serverURL, cleanup := runRESTServer(ctx, t, dir)
|
||||
defer cleanup()
|
||||
|
||||
@@ -144,9 +142,7 @@ func BenchmarkBackendREST(t *testing.B) {
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
defer cancel()
|
||||
|
||||
dir, cleanup := rtest.TempDir(t)
|
||||
defer cleanup()
|
||||
|
||||
dir := rtest.TempDir(t)
|
||||
serverURL, cleanup := runRESTServer(ctx, t, dir)
|
||||
defer cleanup()
|
||||
|
||||
|
Reference in New Issue
Block a user