From 7a0cafefe2c191511bd0bc3db1c5b51529597984 Mon Sep 17 00:00:00 2001 From: Eric Fortin Date: Fri, 19 Aug 2016 10:02:50 -0400 Subject: [PATCH] Fixed unittest after removing TagSet type. --- plugins/outputs/opentsdb/opentsdb_test.go | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/plugins/outputs/opentsdb/opentsdb_test.go b/plugins/outputs/opentsdb/opentsdb_test.go index dfac45e7e..669ab5303 100644 --- a/plugins/outputs/opentsdb/opentsdb_test.go +++ b/plugins/outputs/opentsdb/opentsdb_test.go @@ -18,23 +18,23 @@ import ( func TestCleanTags(t *testing.T) { var tagtests = []struct { ptIn map[string]string - outTags TagSet + outTags map[string]string }{ { map[string]string{"one": "two", "three": "four"}, - TagSet{"one": "two", "three": "four"}, + map[string]string{"one": "two", "three": "four"}, }, { map[string]string{"aaa": "bbb"}, - TagSet{"aaa": "bbb"}, + map[string]string{"aaa": "bbb"}, }, { map[string]string{"Sp%ci@l Chars": "g$t repl#ced"}, - TagSet{"Sp-ci-l_Chars": "g-t_repl-ced"}, + map[string]string{"Sp-ci-l_Chars": "g-t_repl-ced"}, }, { map[string]string{}, - TagSet{}, + map[string]string{}, }, } for _, tt := range tagtests { @@ -47,28 +47,28 @@ func TestCleanTags(t *testing.T) { func TestBuildTagsTelnet(t *testing.T) { var tagtests = []struct { - ptIn TagSet + ptIn map[string]string outTags string }{ { - TagSet{"one": "two", "three": "four"}, + map[string]string{"one": "two", "three": "four"}, "one=two three=four", }, { - TagSet{"aaa": "bbb"}, + map[string]string{"aaa": "bbb"}, "aaa=bbb", }, { - TagSet{"one": "two", "aaa": "bbb"}, + map[string]string{"one": "two", "aaa": "bbb"}, "aaa=bbb one=two", }, { - TagSet{}, + map[string]string{}, "", }, } for _, tt := range tagtests { - tags := tt.ptIn.ToLineFormat() + tags := ToLineFormat(tt.ptIn) if !reflect.DeepEqual(tags, tt.outTags) { t.Errorf("\nexpected %+v\ngot %+v\n", tt.outTags, tags) }