File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed
Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change 77 "fmt"
88 "net/http"
99 "net/http/httptest"
10- "os"
1110 "testing"
1211 "time"
1312
@@ -542,15 +541,9 @@ func TestClient_RevokeToken(t *testing.T) {
542541}
543542
544543func TestNewClient_WithProxy (t * testing.T ) {
545- t .Parallel ()
546-
547544 proxyURL := "http://proxy.example.com:8080"
548- os .Setenv ("HTTP_PROXY" , proxyURL )
549- os .Setenv ("HTTPS_PROXY" , proxyURL )
550- os .Setenv ("NO_PROXY" , "localhost,127.0.0.1" )
551- defer os .Unsetenv ("HTTP_PROXY" )
552- defer os .Unsetenv ("HTTPS_PROXY" )
553- defer os .Unsetenv ("NO_PROXY" )
545+ t .Setenv ("HTTP_PROXY" , proxyURL )
546+ t .Setenv ("HTTPS_PROXY" , proxyURL )
554547
555548 conf := & Config {
556549 AppID : testAppID1 ,
@@ -572,7 +565,6 @@ func TestNewClient_WithProxy(t *testing.T) {
572565 t .Fatalf ("Expected *http.Client, got %T" , appTransport .Client )
573566 }
574567
575- // Safely assert that httpClient.Transport is of the correct type
576568 transport , ok := httpClient .Transport .(* http.Transport )
577569 if ! ok {
578570 t .Fatalf ("Expected *http.Transport, got %T" , httpClient .Transport )
You can’t perform that action at this time.
0 commit comments