mirror of
https://github.com/restic/restic.git
synced 2025-12-03 22:21:47 +00:00
test: Use testing.T.Cleanup to remove tempdirs
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user