diff --git a/plugins/lustre2/lustre2.go b/plugins/lustre2/lustre2.go index 72a83e5f1..95b6bdbf7 100644 --- a/plugins/lustre2/lustre2.go +++ b/plugins/lustre2/lustre2.go @@ -1,5 +1,3 @@ -// +build linux - /* Lustre 2.x telegraf plugin diff --git a/testutil/accumulator.go b/testutil/accumulator.go index 238eb5042..db3a67e66 100644 --- a/testutil/accumulator.go +++ b/testutil/accumulator.go @@ -128,6 +128,18 @@ func (a *Accumulator) HasIntValue(measurement string) bool { return false } +// HasUIntValue returns true if the measurement has a UInt value +func (a *Accumulator) HasUIntValue(measurement string) bool { + for _, p := range a.Points { + if p.Measurement == measurement { + _, ok := p.Values["value"].(uint64) + return ok + } + } + + return false +} + // HasFloatValue returns true if the given measurement has a float value func (a *Accumulator) HasFloatValue(measurement string) bool { for _, p := range a.Points {