1
0
mirror of https://github.com/oauth2-proxy/oauth2-proxy.git synced 2024-11-24 08:52:25 +02:00

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()
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 + "/")