Skip to content

Commit

Permalink
Ensure TestNewReverseProxy() passes when offline
Browse files Browse the repository at this point in the history
This reflects the apparent intent of TestNewReverseProxy(). Without this
change, the test will fail when run without an Internet connection.
  • Loading branch information
Mike Bland committed Apr 3, 2015
1 parent 66d4d72 commit a9837f9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions oauthproxy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ func TestNewReverseProxy(t *testing.T) {
defer backend.Close()

backendURL, _ := url.Parse(backend.URL)
backendHostname := "upstream.127.0.0.1.xip.io"
_, backendPort, _ := net.SplitHostPort(backendURL.Host)
backendHostname, backendPort, _ := net.SplitHostPort(backendURL.Host)
backendHost := net.JoinHostPort(backendHostname, backendPort)
proxyURL, _ := url.Parse(backendURL.Scheme + "://" + backendHost + "/")

Expand Down

0 comments on commit a9837f9

Please sign in to comment.