Skip to content

Commit

Permalink
add errcheck (docker#93)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Miller authored and ndeloof committed Feb 1, 2023
1 parent 96b4229 commit 84624bc
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions pkg/watch/notify_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 84624bc

Please sign in to comment.