diff --git a/plugins/inputs/reader/reader_test.go b/plugins/inputs/reader/reader_test.go index a30ec2f92..339eba16d 100644 --- a/plugins/inputs/reader/reader_test.go +++ b/plugins/inputs/reader/reader_test.go @@ -49,7 +49,7 @@ func TestGrokParser(t *testing.T) { log.Printf("err: %v", err) log.Printf("metric[0]_tags: %v, metric[0]_fields: %v", acc.Metrics[0].Tags, acc.Metrics[0].Fields) log.Printf("metric[1]_tags: %v, metric[1]_fields: %v", acc.Metrics[1].Tags, acc.Metrics[1].Fields) - t.Error() + assert.Equal(t, 2, len(acc.Metrics)) } func getPluginDir() string { diff --git a/plugins/parsers/grok/parser_test.go b/plugins/parsers/grok/parser_test.go index 5dc01911c..b87c112d2 100644 --- a/plugins/parsers/grok/parser_test.go +++ b/plugins/parsers/grok/parser_test.go @@ -17,5 +17,4 @@ func TestGrokParse(t *testing.T) { metrics, err := parser.Parse([]byte(`127.0.0.1 user-identifier frank [10/Oct/2000:13:55:36 -0700] "GET /apache_pb.gif HTTP/1.0" 200 2326`)) log.Printf("metric_tags: %v, metric_fields: %v", metrics[0].Tags(), metrics[0].Fields()) assert.NoError(t, err) - //t.Error() }