From 504d9784465a6250b232e82211e51efe1fd854aa Mon Sep 17 00:00:00 2001 From: Max U Date: Thu, 21 Jun 2018 16:12:26 -0700 Subject: [PATCH] clean up some test cases --- plugins/inputs/reader/reader_test.go | 2 +- plugins/parsers/grok/parser_test.go | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) 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() }