mirror of
https://github.com/docker/compose.git
synced 2025-07-22 05:04:27 +02:00
add errcheck (#93)
This commit is contained in:
parent
a755c84ea0
commit
a3b012d89f
@ -92,7 +92,10 @@ func TestWatchesAreRecursive(t *testing.T) {
|
|||||||
|
|
||||||
// add a sub directory
|
// add a sub directory
|
||||||
subPath := filepath.Join(root.Path(), "sub")
|
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
|
// watch parent
|
||||||
err = f.notify.Add(root.Path())
|
err = f.notify.Add(root.Path())
|
||||||
@ -133,7 +136,10 @@ func TestNewDirectoriesAreRecursivelyWatched(t *testing.T) {
|
|||||||
f.events = nil
|
f.events = nil
|
||||||
// add a sub directory
|
// add a sub directory
|
||||||
subPath := filepath.Join(root.Path(), "sub")
|
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
|
// change something inside sub directory
|
||||||
changeFilePath := filepath.Join(subPath, "change")
|
changeFilePath := filepath.Join(subPath, "change")
|
||||||
_, err = os.OpenFile(changeFilePath, os.O_RDONLY|os.O_CREATE, 0666)
|
_, err = os.OpenFile(changeFilePath, os.O_RDONLY|os.O_CREATE, 0666)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user