From aa0adc98f9e421731329a32511a6d17417716675 Mon Sep 17 00:00:00 2001 From: Cameron Sparr Date: Tue, 4 Aug 2015 16:48:19 -0600 Subject: [PATCH] Build & unit test fixup --- plugins/lustre2/lustre2.go | 2 -- testutil/accumulator.go | 12 ++++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) 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 {