aboutsummaryrefslogtreecommitdiff
path: root/plugin/auto/watcher_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/auto/watcher_test.go')
-rw-r--r--plugin/auto/watcher_test.go12
1 files changed, 2 insertions, 10 deletions
diff --git a/plugin/auto/watcher_test.go b/plugin/auto/watcher_test.go
index 43f1ff374..9a256f443 100644
--- a/plugin/auto/watcher_test.go
+++ b/plugin/auto/watcher_test.go
@@ -8,14 +8,10 @@ import (
)
func TestWatcher(t *testing.T) {
- tempdir, err := createFiles()
+ tempdir, err := createFiles(t)
if err != nil {
- if tempdir != "" {
- os.RemoveAll(tempdir)
- }
t.Fatal(err)
}
- defer os.RemoveAll(tempdir)
ldr := loader{
directory: tempdir,
@@ -54,14 +50,10 @@ func TestWatcher(t *testing.T) {
}
func TestSymlinks(t *testing.T) {
- tempdir, err := createFiles()
+ tempdir, err := createFiles(t)
if err != nil {
- if tempdir != "" {
- os.RemoveAll(tempdir)
- }
t.Fatal(err)
}
- defer os.RemoveAll(tempdir)
ldr := loader{
directory: tempdir,