Fix handling of uint64 in datadog output (#4091)

This commit is contained in:
Daniel Nelson
2018-05-01 18:56:39 -07:00
committed by GitHub
parent c03e8918a2
commit cff7ee8edf
2 changed files with 27 additions and 7 deletions

View File

@@ -168,6 +168,30 @@ func TestBuildPoint(t *testing.T) {
},
nil,
},
{
testutil.TestMetric(int64(0), "test int64"),
Point{
float64(time.Date(2009, time.November, 10, 23, 0, 0, 0, time.UTC).Unix()),
0.0,
},
nil,
},
{
testutil.TestMetric(uint64(0), "test uint64"),
Point{
float64(time.Date(2009, time.November, 10, 23, 0, 0, 0, time.UTC).Unix()),
0.0,
},
nil,
},
{
testutil.TestMetric(true, "test bool"),
Point{
float64(time.Date(2009, time.November, 10, 23, 0, 0, 0, time.UTC).Unix()),
1.0,
},
nil,
},
}
for _, tt := range tagtests {
pt, err := buildMetrics(tt.ptIn)