Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitriy Kalinin and Pieter Noordhuis committed Jan 30, 2013
1 parent d086a00 commit 7b7e209
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 3 additions & 0 deletions src/router/router_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ func (s *RouterSuite) SetUpSuite(c *C) {
s.Config.Port = s.proxyPort
s.Config.Index = 2

// Hardcode the IP to localhost to avoid leaving the machine while running tests
s.Config.Ip = "127.0.0.1"

s.Config.Status = config.StatusConfig{
Port: statusPort,
User: "user",
Expand Down
4 changes: 1 addition & 3 deletions src/router/test/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,6 @@ func (a *TestApp) VerifyTraceHeader(c *C) {
var resp *http.Response
var err error

routerIP, _ := common.LocalIP()

for _, url := range a.urls {
uri := fmt.Sprintf("http://%s:%d", url, a.rPort)

Expand All @@ -114,7 +112,7 @@ func (a *TestApp) VerifyTraceHeader(c *C) {
c.Assert(err, IsNil)
c.Check(resp.StatusCode, Equals, 200)
c.Check(resp.Header.Get(VcapBackendHeader), Equals, fmt.Sprintf("localhost:%d", a.port))
c.Check(resp.Header.Get(VcapRouterHeader), Equals, routerIP)
c.Check(resp.Header.Get(VcapRouterHeader), Equals, "127.0.0.1")
}
}

Expand Down

0 comments on commit 7b7e209

Please sign in to comment.