Skip to content

Commit

Permalink
testutil: Use HTTPAddr
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanuber committed Mar 20, 2015
1 parent 8ea04bb commit fa7414e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion api/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
16 changes: 8 additions & 8 deletions testutil/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit fa7414e

Please sign in to comment.