From a3b012d89fef3273222570d625b954266f7e9a05 Mon Sep 17 00:00:00 2001 From: Dan Miller Date: Mon, 20 Aug 2018 09:47:40 -0400 Subject: [PATCH] add errcheck (#93) --- pkg/watch/notify_test.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pkg/watch/notify_test.go b/pkg/watch/notify_test.go index b38e72cd7..28a9bddc0 100644 --- a/pkg/watch/notify_test.go +++ b/pkg/watch/notify_test.go @@ -92,7 +92,10 @@ func TestWatchesAreRecursive(t *testing.T) { // add a sub directory subPath := filepath.Join(root.Path(), "sub") - os.MkdirAll(subPath, os.ModePerm) + err = os.MkdirAll(subPath, os.ModePerm) + if err != nil { + t.Fatal(err) + } // watch parent err = f.notify.Add(root.Path()) @@ -133,7 +136,10 @@ func TestNewDirectoriesAreRecursivelyWatched(t *testing.T) { f.events = nil // add a sub directory subPath := filepath.Join(root.Path(), "sub") - os.MkdirAll(subPath, os.ModePerm) + err = os.MkdirAll(subPath, os.ModePerm) + if err != nil { + f.t.Fatal(err) + } // change something inside sub directory changeFilePath := filepath.Join(subPath, "change") _, err = os.OpenFile(changeFilePath, os.O_RDONLY|os.O_CREATE, 0666)