0.3.0 unit tests: jolokia, kafka_consumer, leofs, lustre2

This commit is contained in:
Cameron Sparr
2016-01-06 16:55:28 -07:00
parent 524fddedb4
commit 9ada89d51a
8 changed files with 75 additions and 97 deletions

View File

@@ -129,7 +129,6 @@ func buildFakeSNMPCmd(src string) {
}
func testMain(t *testing.T, code string, endpoint string, serverType ServerType) {
// Build the fake snmpwalk for test
src := makeFakeSNMPSrc(code)
defer os.Remove(src)
@@ -145,6 +144,7 @@ func testMain(t *testing.T, code string, endpoint string, serverType ServerType)
}
var acc testutil.Accumulator
acc.SetDebug(true)
err := l.Gather(&acc)
require.NoError(t, err)
@@ -152,7 +152,7 @@ func testMain(t *testing.T, code string, endpoint string, serverType ServerType)
floatMetrics := KeyMapping[serverType]
for _, metric := range floatMetrics {
assert.True(t, acc.HasFloatValue(metric), metric)
assert.True(t, acc.HasFloatField("leofs", metric), metric)
}
}