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
|
@ -9,9 +9,7 @@ import (
|
|||
)
|
||||
|
||||
func TestExtendedStat(t *testing.T) {
|
||||
tempdir, cleanup := restictest.TempDir(t)
|
||||
defer cleanup()
|
||||
|
||||
tempdir := restictest.TempDir(t)
|
||||
filename := filepath.Join(tempdir, "file")
|
||||
err := os.WriteFile(filename, []byte("foobar"), 0640)
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue