test(unit): Test for whitelisted metrics

This commit is contained in:
Sergio Jimenez 2016-02-11 00:57:36 +01:00
parent 8c6a6604ce
commit 7d10986f10
1 changed files with 8 additions and 0 deletions

View File

@ -75,6 +75,7 @@ func TestMesosMaster(t *testing.T) {
m := Mesos{
Servers: []string{ts.Listener.Addr().String()},
Timeout: 10,
}
err := m.Gather(&acc)
@ -108,6 +109,13 @@ func TestRemoveGroup(t *testing.T) {
}
}
}
for _, v := range m.MetricsCol {
for _, x := range masterBlocks(v) {
if _, ok := mesosMetrics[x]; !ok {
t.Errorf("Didn't find key %s, it should present.", x)
}
}
}
}
func TestMasterBlocks(t *testing.T) {