Added new test regarding checks index

This commit is contained in:
Pierre Souchay 2018-03-22 12:20:25 +01:00
parent a8b66fb7aa
commit 7e8e4e014b
1 changed files with 3 additions and 0 deletions

View File

@ -2137,6 +2137,9 @@ func TestStateStore_DeleteCheck(t *testing.T) {
if err := s.DeleteCheck(3, "node1", "check1"); err != nil {
t.Fatalf("err: %s", err)
}
if idx := s.maxIndex("checks"); idx != 3 {
t.Fatalf("bad index: %d", idx)
}
if !watchFired(ws) {
t.Fatalf("bad")
}