Check of the content of the line
This commit is contained in:
parent
a7c1263528
commit
86ea7df4bc
|
@ -101,9 +101,11 @@ func TestStopAtEOF(t *testing.T) {
|
||||||
tail := tailTest.StartTail("test.txt", Config{Follow: true, Location: nil})
|
tail := tailTest.StartTail("test.txt", Config{Follow: true, Location: nil})
|
||||||
|
|
||||||
// read "hello"
|
// read "hello"
|
||||||
<-tail.Lines
|
line := <-tail.Lines
|
||||||
|
if line.Text != "hello" {
|
||||||
|
t.Errorf("Expected to get 'hello', got '%s' instead", line)
|
||||||
|
}
|
||||||
|
|
||||||
<-time.After(100 * time.Millisecond)
|
|
||||||
tailTest.VerifyTailOutput(tail, []string{"there", "world"}, false)
|
tailTest.VerifyTailOutput(tail, []string{"there", "world"}, false)
|
||||||
tail.StopAtEOF()
|
tail.StopAtEOF()
|
||||||
tailTest.Cleanup(tail, true)
|
tailTest.Cleanup(tail, true)
|
||||||
|
|
Loading…
Reference in New Issue