Apply go fmt to the test file and plugins/all.go
This commit is contained in:
parent
4a94a7c40b
commit
39a1f4ee18
|
@ -14,6 +14,7 @@ import (
|
|||
_ "github.com/influxdata/telegraf/plugins/inputs/couchbase"
|
||||
_ "github.com/influxdata/telegraf/plugins/inputs/couchdb"
|
||||
_ "github.com/influxdata/telegraf/plugins/inputs/disque"
|
||||
_ "github.com/influxdata/telegraf/plugins/inputs/dns_activity"
|
||||
_ "github.com/influxdata/telegraf/plugins/inputs/dns_query"
|
||||
_ "github.com/influxdata/telegraf/plugins/inputs/docker"
|
||||
_ "github.com/influxdata/telegraf/plugins/inputs/dovecot"
|
||||
|
@ -76,5 +77,4 @@ import (
|
|||
_ "github.com/influxdata/telegraf/plugins/inputs/win_perf_counters"
|
||||
_ "github.com/influxdata/telegraf/plugins/inputs/zfs"
|
||||
_ "github.com/influxdata/telegraf/plugins/inputs/zookeeper"
|
||||
_ "github.com/influxdata/telegraf/plugins/inputs/dns_activity"
|
||||
)
|
||||
|
|
|
@ -39,13 +39,13 @@ func TestDNS_Activity_Gather(t *testing.T) {
|
|||
|
||||
metric, success := acc.Get("dns_activity_type")
|
||||
|
||||
assert.True(t, success) // Do we have the metric
|
||||
assert.True(t, success) // Do we have the metric
|
||||
assert.True(t, metric.Fields["count"].(int) >= 1) // Did we count at least one DNS answer
|
||||
assert.True(t, metric.Fields["bytes"].(int) >= 4) // Did we count at least 4 bytes (A response size)
|
||||
|
||||
metric, success = acc.Get("dns_activity_error")
|
||||
|
||||
assert.True(t, success) // Do we have the metric
|
||||
assert.True(t, success) // Do we have the metric
|
||||
assert.True(t, metric.Fields["count"].(int) >= 1) // Did we count at least one response
|
||||
|
||||
dnsactivity.Stop()
|
||||
|
|
Loading…
Reference in New Issue