Skip to content

Commit

Permalink
test(unit): Test for whitelisted metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergio Jimenez committed Feb 18, 2016
1 parent 8c6a660 commit 7d10986
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions plugins/inputs/mesos/mesos_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ func TestMesosMaster(t *testing.T) {

m := Mesos{
Servers: []string{ts.Listener.Addr().String()},
Timeout: 10,
}

err := m.Gather(&acc)
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 7d10986

Please sign in to comment.