forked from TrueCloudLab/restic
test: Use testing.T.Cleanup to remove tempdirs
This commit is contained in:
parent
eae7366563
commit
f90bf84ba7
31 changed files with 79 additions and 176 deletions
|
@ -24,8 +24,7 @@ func TestNoSpacePermanent(t *testing.T) {
|
|||
return nil, fmt.Errorf("not creating tempfile, %w", syscall.ENOSPC)
|
||||
}
|
||||
|
||||
dir, cleanup := rtest.TempDir(t)
|
||||
defer cleanup()
|
||||
dir := rtest.TempDir(t)
|
||||
|
||||
be, err := Open(context.Background(), Config{Path: dir, Connections: 2})
|
||||
rtest.OK(t, err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue