From 73a2799b0d35710bcc155b29166a76378af3a2b5 Mon Sep 17 00:00:00 2001 From: Ryan Uber Date: Wed, 11 Mar 2015 09:47:47 -0700 Subject: [PATCH] testutil: Use HTTPAddr --- api/api_test.go | 2 +- testutil/server.go | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/api/api_test.go b/api/api_test.go index acc572225..9c86e17ae 100644 --- a/api/api_test.go +++ b/api/api_test.go @@ -33,7 +33,7 @@ func makeClientWithConfig( // Create server server := testutil.NewTestServerConfig(t, cb2) - conf.Address = server.APIAddr + conf.Address = server.HTTPAddr // Create client client, err := NewClient(conf) diff --git a/testutil/server.go b/testutil/server.go index 94cfb1069..836cb3ec8 100644 --- a/testutil/server.go +++ b/testutil/server.go @@ -97,10 +97,10 @@ type TestCheck struct { // TestServer is the main server wrapper struct. type TestServer struct { - PID int - Config *TestServerConfig - APIAddr string - t *testing.T + PID int + Config *TestServerConfig + HTTPAddr string + t *testing.T } // NewTestServer is an easy helper method to create a new Consul @@ -153,10 +153,10 @@ func NewTestServerConfig(t *testing.T, cb ServerConfigCallback) *TestServer { } server := &TestServer{ - Config: consulConfig, - PID: cmd.Process.Pid, - APIAddr: fmt.Sprintf("127.0.0.1:%d", consulConfig.Ports.HTTP), - t: t, + Config: consulConfig, + PID: cmd.Process.Pid, + HTTPAddr: fmt.Sprintf("127.0.0.1:%d", consulConfig.Ports.HTTP), + t: t, } // Wait for the server to be ready