Skip to content

Commit

Permalink
[~] modify env variables name
Browse files Browse the repository at this point in the history
  • Loading branch information
Noooste committed Aug 21, 2023
1 parent 9b66d6f commit a8199d8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions connection_proxy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ var skipProxy bool
func TestProxyDialer_Dial(t *testing.T) {
session := NewSession()

if err := session.SetProxy(os.Getenv("HTTP_PROXY")); err != nil {
if err := session.SetProxy(os.Getenv("NON_SECURE_PROXY")); err != nil {
skipProxy = true
t.Fatal(err)
}
Expand Down Expand Up @@ -81,11 +81,11 @@ func TestProxy(t *testing.T) {

session.InsecureSkipVerify = true

if os.Getenv("HTTP_PROXY") == "" {
t.Fatal("TestProxy failed, HTTP_PROXY is not set")
if os.Getenv("NON_SECURE_PROXY") == "" {
t.Fatal("TestProxy failed, NON_SECURE_PROXY is not set")
}

session.SetProxy(os.Getenv("HTTP_PROXY"))
session.SetProxy(os.Getenv("NON_SECURE_PROXY"))

response, err = session.Get("https://api.ipify.org/")

Expand All @@ -104,7 +104,7 @@ func TestProxy2(t *testing.T) {
session := NewSession()

session.H2Proxy = true
if err := session.SetProxy(os.Getenv("HTTP_PROXY")); err != nil {
if err := session.SetProxy(os.Getenv("NON_SECURE_PROXY")); err != nil {
t.Fatal(err)
}

Expand All @@ -119,7 +119,7 @@ func TestProxy3(t *testing.T) {
session := NewSession()
session.H2Proxy = true

if err := session.SetProxy(os.Getenv("HTTPS_PROXY")); err != nil {
if err := session.SetProxy(os.Getenv("SECURE_PROXY")); err != nil {
t.Fatal(err)
}

Expand Down
2 changes: 1 addition & 1 deletion session_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func TestSession_Ip(t *testing.T) {

oldIP := string(response.Body)

if err = session.SetProxy(os.Getenv("HTTP_PROXY")); err != nil {
if err = session.SetProxy(os.Getenv("NON_SECURE_PROXY")); err != nil {
t.Fatal(err)
}

Expand Down

0 comments on commit a8199d8

Please sign in to comment.