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

Function TestWatchNonExistentPathDoesNotFireSiblingEvent

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

Source from the content-addressed store, hash-verified

211}
212
213func TestWatchNonExistentPathDoesNotFireSiblingEvent(t *testing.T) {
214 f := newNotifyFixture(t)
215
216 root := f.TempDir("root")
217 watchedFile := filepath.Join(root, "a.txt")
218 unwatchedSibling := filepath.Join(root, "b.txt")
219
220 f.watch(watchedFile)
221 f.fsync()
222
223 d1 := "hello\ngo\n"
224 f.WriteFile(unwatchedSibling, d1)
225 f.assertEvents()
226}
227
228func TestRemove(t *testing.T) {
229 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