diff --git a/collectd/collectd_test.go b/collectd/collectd_test.go index bad6de8212..19b366ab18 100644 --- a/collectd/collectd_test.go +++ b/collectd/collectd_test.go @@ -210,22 +210,18 @@ func TestUnmarshal_Points(t *testing.T) { }{ { name: "single value", - points: []influxdb.Point{ - {Name: "disk_read", Fields: map[string]interface{}{"disk_read": float64(1)}}, - }, packet: gollectd.Packet{ Plugin: "disk", Values: []gollectd.Value{ {Name: "read", Value: 1}, }, }, + points: []influxdb.Point{ + {Name: "disk_read", Fields: map[string]interface{}{"disk_read": float64(1)}}, + }, }, { name: "multi value", - points: []influxdb.Point{ - {Name: "disk_read", Fields: map[string]interface{}{"disk_read": float64(1)}}, - {Name: "disk_write", Fields: map[string]interface{}{"disk_write": float64(5)}}, - }, packet: gollectd.Packet{ Plugin: "disk", Values: []gollectd.Value{ @@ -233,16 +229,13 @@ func TestUnmarshal_Points(t *testing.T) { {Name: "write", Value: 5}, }, }, + points: []influxdb.Point{ + {Name: "disk_read", Fields: map[string]interface{}{"disk_read": float64(1)}}, + {Name: "disk_write", Fields: map[string]interface{}{"disk_write": float64(5)}}, + }, }, { name: "tags", - points: []influxdb.Point{ - { - Name: "disk_read", - Tags: map[string]string{"host": "server01", "instance": "sdk", "type": "disk_octets", "type_instance": "single"}, - Fields: map[string]interface{}{"disk_read": float64(1)}, - }, - }, packet: gollectd.Packet{ Plugin: "disk", Hostname: "server01", @@ -253,6 +246,13 @@ func TestUnmarshal_Points(t *testing.T) { {Name: "read", Value: 1}, }, }, + points: []influxdb.Point{ + { + Name: "disk_read", + Tags: map[string]string{"host": "server01", "instance": "sdk", "type": "disk_octets", "type_instance": "single"}, + Fields: map[string]interface{}{"disk_read": float64(1)}, + }, + }, }, }