From 39a7b5c20daf3a16b7d265d17fbfedc8874bd048 Mon Sep 17 00:00:00 2001 From: Pierre Souchay Date: Thu, 22 Mar 2018 12:20:25 +0100 Subject: [PATCH] Added new test regarding checks index --- agent/consul/state/catalog_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/agent/consul/state/catalog_test.go b/agent/consul/state/catalog_test.go index 1c3b1a8678..818670908a 100644 --- a/agent/consul/state/catalog_test.go +++ b/agent/consul/state/catalog_test.go @@ -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") }