From bcdabe4606c0317fce08809aff2fbcbdf42996d6 Mon Sep 17 00:00:00 2001 From: James Phillips Date: Mon, 12 Oct 2015 21:47:01 -0700 Subject: [PATCH] Knocks out the Raft indexes before doing compare. --- command/agent/local_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/command/agent/local_test.go b/command/agent/local_test.go index d8f6cfbfe..7f45267bb 100644 --- a/command/agent/local_test.go +++ b/command/agent/local_test.go @@ -127,6 +127,7 @@ func TestAgentAntiEntropy_Services(t *testing.T) { // All the services should match for id, serv := range services.NodeServices.Services { + serv.CreateIndex, serv.ModifyIndex = 0, 0 switch id { case "mysql": if !reflect.DeepEqual(serv, srv1) { @@ -236,6 +237,7 @@ func TestAgentAntiEntropy_EnableTagOverride(t *testing.T) { // All the services should match for id, serv := range services.NodeServices.Services { + serv.CreateIndex, serv.ModifyIndex = 0, 0 switch id { case "svc_id1": if serv.ID != "svc_id1" || @@ -455,6 +457,7 @@ func TestAgentAntiEntropy_Services_ACLDeny(t *testing.T) { // All the services should match for id, serv := range services.NodeServices.Services { + serv.CreateIndex, serv.ModifyIndex = 0, 0 switch id { case "mysql": t.Fatalf("should not be permitted") @@ -581,6 +584,7 @@ func TestAgentAntiEntropy_Checks(t *testing.T) { // All the checks should match for _, chk := range checks.HealthChecks { + chk.CreateIndex, chk.ModifyIndex = 0, 0 switch chk.CheckID { case "mysql": if !reflect.DeepEqual(chk, chk1) {