test(GODT-1602): run integration tests against black 🖤

This commit is contained in:
Jakub Cuth
2024-02-19 10:43:35 +00:00
parent 2a1aeb208d
commit 37352d44d2
51 changed files with 525 additions and 271 deletions

View File

@ -18,7 +18,6 @@
package tests
import (
"crypto/tls"
"net/http"
"net/url"
"os"
@ -26,6 +25,7 @@ import (
"github.com/Masterminds/semver/v3"
"github.com/ProtonMail/go-proton-api"
"github.com/ProtonMail/go-proton-api/server"
"github.com/ProtonMail/proton-bridge/v3/internal/dialer"
)
type API interface {
@ -73,13 +73,14 @@ func newLiveAPI(hostURL string) API {
panic(err)
}
tr := proton.InsecureTransport()
dialer.SetBasicTransportTimeouts(tr)
tr.Proxy = http.ProxyFromEnvironment
return &liveAPI{
Server: server.New(
server.WithProxyOrigin(hostURL),
server.WithProxyTransport(&http.Transport{
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
Proxy: http.ProxyFromEnvironment,
}),
server.WithProxyTransport(tr),
),
domain: url.Hostname(),
}