diff --git a/.github/workflows/test-on-pr.yml b/.github/workflows/test-on-pr.yml index 3cfabf0..9f0019e 100644 --- a/.github/workflows/test-on-pr.yml +++ b/.github/workflows/test-on-pr.yml @@ -17,8 +17,10 @@ jobs: with: go-version: "1.20.13" - name: Unit test + # Skip TestCloudflareDetection here, as most IP addresses of Github's action + # runners have been marked as bot. run: | - go test -v ./... + go test -skip TestCloudflareDetection -v ./... - name: Build test run: | go build ./cmd/agent diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 021cc5b..ca9b38c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -25,8 +25,10 @@ jobs: with: go-version: "1.20.13" - name: Unit test + # Skip TestCloudflareDetection here, as most IP addresses of Github's action + # runners have been marked as bot. run: | - go test -v ./... + go test -skip TestCloudflareDetection -v ./... #- name: Run Gosec Security Scanner # run: | # go install github.com/securego/gosec/v2/cmd/gosec@v2.19.0 diff --git a/pkg/utls/roundtripper_test.go b/pkg/utls/roundtripper_test.go index e0e9895..a3a6f9d 100644 --- a/pkg/utls/roundtripper_test.go +++ b/pkg/utls/roundtripper_test.go @@ -10,7 +10,7 @@ import ( utlsx "github.com/nezhahq/agent/pkg/utls" ) -const url = "https://www.lexusofpembrokepines.com/wp-content/cache/jellyfish-cache/new-vehicles-js.js?mt=1698335265" +const url = "https://www.patreon.com/login" func TestCloudflareDetection(t *testing.T) { client := http.DefaultClient