From 328728c88a8c405f94a55020c8d411be6cb7b1d2 Mon Sep 17 00:00:00 2001 From: Sean Chittenden Date: Fri, 25 Mar 2016 12:22:33 -0700 Subject: [PATCH] Negative check: test an invalid condition --- consul/server_details/server_details_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/consul/server_details/server_details_test.go b/consul/server_details/server_details_test.go index 6ed2c30ac..b8aef0abd 100644 --- a/consul/server_details/server_details_test.go +++ b/consul/server_details/server_details_test.go @@ -57,4 +57,10 @@ func TestIsConsulServer(t *testing.T) { if parts.Bootstrap { t.Fatalf("unexpected bootstrap") } + + delete(m.Tags, "consul") + ok, parts = server_details.IsConsulServer(m) + if ok { + t.Fatalf("unexpected ok server") + } }