MCPcopy Create free account
hub / github.com/hpcloud/tail / TestWaitsForFileToExist

Function TestWaitsForFileToExist

tail_test.go:54–62  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

52}
53
54func TestWaitsForFileToExist(t *testing.T) {
55 tailTest := NewTailTest("waits-for-file-to-exist", t)
56 tail := tailTest.StartTail("test.txt", Config{})
57 go tailTest.VerifyTailOutput(tail, []string{"hello", "world"}, false)
58
59 <-time.After(100 * time.Millisecond)
60 tailTest.CreateFile("test.txt", "hello\nworld\n")
61 tailTest.Cleanup(tail, true)
62}
63
64func TestWaitsForFileToExistRelativePath(t *testing.T) {
65 tailTest := NewTailTest("waits-for-file-to-exist-relative", t)

Callers

nothing calls this directly

Calls 5

StartTailMethod · 0.95
VerifyTailOutputMethod · 0.95
CreateFileMethod · 0.95
CleanupMethod · 0.95
NewTailTestFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…