Skip to content

Commit 5e3457b

Browse files
committed
TestZFSUsage: use t.TempDir()
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
1 parent 6e9c675 commit 5e3457b

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

zfs_test.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,7 @@ func TestZFSUsage(t *testing.T) {
101101
ctx := context.Background()
102102

103103
// Create temporary directory
104-
root, err := os.MkdirTemp("", "TestZFSUsage-")
105-
if err != nil {
106-
t.Error(err)
107-
}
108-
defer os.RemoveAll(root)
104+
root := t.TempDir()
109105

110106
// Create the snapshotter
111107
z, closer, err := newSnapshotter()(ctx, root)

0 commit comments

Comments
 (0)