Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[~] modify env variables name #6

Merged
merged 4 commits into from
Aug 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ jobs:
go test -v ./... -covermode=count -coverprofile=coverage.out
go tool cover -func=coverage.out -o=coverage.out
env:
HTTPS_PROXY: ${{ secrets.HTTPS_PROXY }}
HTTP_PROXY: ${{ secrets.HTTP_PROXY }}
SECURE_PROXY: ${{ secrets.SECURE_PROXY }}
NON_SECURE_PROXY: ${{ secrets.NON_SECURE_PROXY }}

- name: Go Coverage Badge # Pass the `coverage.out` output to this action
uses: tj-actions/coverage-badge-go@v2
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ jobs:
- name: Run tests
run: go test -cover ./...
env:
HTTPS_PROXY: ${{ secrets.HTTPS_PROXY }}
HTTP_PROXY: ${{ secrets.HTTP_PROXY }}
SECURE_PROXY: ${{ secrets.SECURE_PROXY }}
NON_SECURE_PROXY: ${{ secrets.NON_SECURE_PROXY }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# AzureTLS Client
[![GoDoc](https://godoc.org/github.com/Noooste/azuretls-client?status.svg)](https://godoc.org/github.com/Noooste/azuretls-client)
![Coverage](https://img.shields.io/badge/Coverage-83.5%25-brightgreen)
![Coverage](https://img.shields.io/badge/Coverage-84.3%25-brightgreen)
[![build](https://github.com/Noooste/azuretls-client/actions/workflows/push.yml/badge.svg?branch=improvement)](https://github.com/Noooste/azuretls-client/actions/workflows/push.yml)
[![Go Report Card](https://goreportcard.com/badge/Noooste/azuretls-client)](https://goreportcard.com/report/Noooste/azuretls-client)
[![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/Noooste/azuretls-client/blob/master/LICENSE)
Expand Down
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