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

Function newNotifyFixture

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

Source from the content-addressed store, hash-verified

499}
500
501func newNotifyFixture(t *testing.T) *notifyFixture {
502 out := bytes.NewBuffer(nil)
503 ctx, cancel := context.WithCancel(t.Context())
504 nf := &notifyFixture{
505 ctx: ctx,
506 cancel: cancel,
507 TempDirFixture: NewTempDirFixture(t),
508 paths: []string{},
509 out: out,
510 }
511 nf.watch(nf.TempDir("watched"))
512 t.Cleanup(nf.tearDown)
513 return nf
514}
515
516func (f *notifyFixture) watch(path string) {
517 f.paths = append(f.paths, path)

Callers 15

TestDontWatchEachFileFunction · 0.85
TestNoEventsFunction · 0.85
TestNoWatchesFunction · 0.85
TestEventOrderingFunction · 0.85
TestGitBranchSwitchFunction · 0.85
TestWatchesAreRecursiveFunction · 0.85
TestWatchNonExistentPathFunction · 0.85
TestRemoveFunction · 0.85
TestRemoveAndAddBackFunction · 0.85

Calls 3

watchMethod · 0.95
NewTempDirFixtureFunction · 0.85
TempDirMethod · 0.80

Tested by

no test coverage detected