@@ -25,6 +25,10 @@ func TestBuildTagsTelnet(t *testing.T) {
|
||||
map[string]string{"one": "two", "aaa": "bbb"},
|
||||
[]string{"aaa=bbb", "one=two"},
|
||||
},
|
||||
{
|
||||
map[string]string{"Sp%ci@l Chars": "g$t repl#ced"},
|
||||
[]string{"Sp-ci-l_Chars=g-t_repl-ced"},
|
||||
},
|
||||
{
|
||||
map[string]string{},
|
||||
[]string{},
|
||||
@@ -59,13 +63,19 @@ func TestWrite(t *testing.T) {
|
||||
|
||||
// Verify postive and negative test cases of writing data
|
||||
metrics := testutil.MockMetrics()
|
||||
metrics = append(metrics, testutil.TestMetric(float64(1.0), "justametric.float"))
|
||||
metrics = append(metrics, testutil.TestMetric(int64(123456789), "justametric.int"))
|
||||
metrics = append(metrics, testutil.TestMetric(uint64(123456789012345), "justametric.uint"))
|
||||
metrics = append(metrics, testutil.TestMetric("Lorem Ipsum", "justametric.string"))
|
||||
metrics = append(metrics, testutil.TestMetric(float64(42.0), "justametric.anotherfloat"))
|
||||
metrics = append(metrics, testutil.TestMetric(float64(1.0),
|
||||
"justametric.float"))
|
||||
metrics = append(metrics, testutil.TestMetric(int64(123456789),
|
||||
"justametric.int"))
|
||||
metrics = append(metrics, testutil.TestMetric(uint64(123456789012345),
|
||||
"justametric.uint"))
|
||||
metrics = append(metrics, testutil.TestMetric("Lorem Ipsum",
|
||||
"justametric.string"))
|
||||
metrics = append(metrics, testutil.TestMetric(float64(42.0),
|
||||
"justametric.anotherfloat"))
|
||||
metrics = append(metrics, testutil.TestMetric(float64(42.0),
|
||||
"metric w/ specialchars"))
|
||||
|
||||
err = o.Write(metrics)
|
||||
require.NoError(t, err)
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user