test: Use testing.T.Cleanup to remove tempdirs

This commit is contained in:
greatroar 2022-12-09 13:42:33 +01:00
parent eae7366563
commit f90bf84ba7
31 changed files with 79 additions and 176 deletions

View file

@ -16,8 +16,7 @@ func TestLayout(t *testing.T) {
t.Skip("sftp server binary not available")
}
path, cleanup := rtest.TempDir(t)
defer cleanup()
path := rtest.TempDir(t)
var tests = []struct {
filename string