From 3e32e906d19a3175771eef7bf1a331418303d217 Mon Sep 17 00:00:00 2001 From: Armon Dadgar Date: Mon, 13 Oct 2014 17:52:51 -0700 Subject: [PATCH] agent: Fixing tests --- command/agent/local_test.go | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/command/agent/local_test.go b/command/agent/local_test.go index 658d8ca82a..29bf379806 100644 --- a/command/agent/local_test.go +++ b/command/agent/local_test.go @@ -1,12 +1,13 @@ package agent import ( - "github.com/hashicorp/consul/consul/structs" - "github.com/hashicorp/consul/testutil" "os" "reflect" "testing" "time" + + "github.com/hashicorp/consul/consul/structs" + "github.com/hashicorp/consul/testutil" ) func TestAgentAntiEntropy_Services(t *testing.T) { @@ -42,7 +43,7 @@ func TestAgentAntiEntropy_Services(t *testing.T) { srv2 := &structs.NodeService{ ID: "redis", Service: "redis", - Tags: nil, + Tags: []string{}, Port: 8000, } agent.state.AddService(srv2) @@ -59,7 +60,7 @@ func TestAgentAntiEntropy_Services(t *testing.T) { srv3 := &structs.NodeService{ ID: "web", Service: "web", - Tags: nil, + Tags: []string{}, Port: 80, } agent.state.AddService(srv3) @@ -68,7 +69,7 @@ func TestAgentAntiEntropy_Services(t *testing.T) { srv4 := &structs.NodeService{ ID: "lb", Service: "lb", - Tags: nil, + Tags: []string{}, Port: 443, } args.Service = srv4 @@ -104,7 +105,7 @@ func TestAgentAntiEntropy_Services(t *testing.T) { } case "redis": if !reflect.DeepEqual(serv, srv2) { - t.Fatalf("bad: %v %v", serv, srv2) + t.Fatalf("bad: %#v %#v", serv, srv2) } case "web": if !reflect.DeepEqual(serv, srv3) {