Ensure TestNewReverseProxy() passes when offline

This reflects the apparent intent of TestNewReverseProxy(). Without this
change, the test will fail when run without an Internet connection.
This commit is contained in:
Mike Bland 2015-04-02 21:06:37 -04:00
parent 66d4d72d2e
commit a9837f90aa

View File

@ -18,8 +18,7 @@ func TestNewReverseProxy(t *testing.T) {
defer backend.Close() defer backend.Close()
backendURL, _ := url.Parse(backend.URL) backendURL, _ := url.Parse(backend.URL)
backendHostname := "upstream.127.0.0.1.xip.io" backendHostname, backendPort, _ := net.SplitHostPort(backendURL.Host)
_, backendPort, _ := net.SplitHostPort(backendURL.Host)
backendHost := net.JoinHostPort(backendHostname, backendPort) backendHost := net.JoinHostPort(backendHostname, backendPort)
proxyURL, _ := url.Parse(backendURL.Scheme + "://" + backendHost + "/") proxyURL, _ := url.Parse(backendURL.Scheme + "://" + backendHost + "/")