Return an error if no valid patterns. (#2753)

This commit is contained in:
Daniel Nelson
2017-05-02 14:54:38 -07:00
committed by GitHub
parent 188703e204
commit f7f1eaef65
3 changed files with 12 additions and 14 deletions

View File

@@ -38,12 +38,8 @@ func TestGrokParseLogFilesNonExistPattern(t *testing.T) {
}
acc := testutil.Accumulator{}
logparser.Start(&acc)
if assert.NotEmpty(t, acc.Errors) {
assert.Error(t, acc.Errors[0])
}
logparser.Stop()
err := logparser.Start(&acc)
assert.Error(t, err)
}
func TestGrokParseLogFiles(t *testing.T) {