GODT-2181: Add env proxy support for integration tests.

This commit is contained in:
Jakub
2023-01-05 16:47:03 +01:00
parent 30d627c2be
commit 4fd4e8a16e

View File

@ -18,6 +18,8 @@
package tests
import (
"crypto/tls"
"net/http"
"net/url"
"os"
@ -72,7 +74,13 @@ func newLiveAPI(hostURL string) API {
}
return &liveAPI{
Server: server.New(server.WithProxyOrigin(hostURL)),
Server: server.New(
server.WithProxyOrigin(hostURL),
server.WithProxyTransport(&http.Transport{
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
Proxy: http.ProxyFromEnvironment,
}),
),
domain: url.Hostname(),
}
}