]> Sergey Matveev's repositories - btrtrc.git/blob - util/dirwatch/dirwatch_test.go
test: use `T.TempDir` to create temporary test directory (#718)
[btrtrc.git] / util / dirwatch / dirwatch_test.go
1 package dirwatch
2
3 import (
4         "testing"
5
6         "github.com/stretchr/testify/require"
7 )
8
9 func TestDirwatch(t *testing.T) {
10         tempDirName := t.TempDir()
11         t.Logf("tempdir: %q", tempDirName)
12         dw, err := New(tempDirName)
13         require.NoError(t, err)
14         defer dw.Close()
15 }