MCPcopy
hub / github.com/docker/compose / TestWatchNonExistentPath

Function TestWatchNonExistentPath

pkg/watch/notify_test.go:199–211  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

197}
198
199func TestWatchNonExistentPath(t *testing.T) {
200 f := newNotifyFixture(t)
201
202 root := f.TempDir("root")
203 path := filepath.Join(root, "change")
204
205 f.watch(path)
206 f.fsync()
207
208 d1 := "hello\ngo\n"
209 f.WriteFile(path, d1)
210 f.assertEvents(path)
211}
212
213func TestWatchNonExistentPathDoesNotFireSiblingEvent(t *testing.T) {
214 f := newNotifyFixture(t)

Callers

nothing calls this directly

Calls 6

newNotifyFixtureFunction · 0.85
TempDirMethod · 0.80
fsyncMethod · 0.80
WriteFileMethod · 0.80
assertEventsMethod · 0.80
watchMethod · 0.45

Tested by

no test coverage detected