We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4b5b04c commit 5b74a57Copy full SHA for 5b74a57
shared_test.go
@@ -2,6 +2,7 @@ package shuffle
2
3
import (
4
"testing"
5
+ "net/http"
6
)
7
8
func TestIsLoop(t *testing.T) {
@@ -26,3 +27,17 @@ func TestIsLoop(t *testing.T) {
26
27
}
28
29
30
+
31
+// Simple Test for HandleInternalProxy(client)
32
+// set env SHUFFLE_INTERNAL_HTTP_PROXY to test the function.
33
+func TestHandleInternalProxy(t *testing.T) {
34
+ client := &http.Client{}
35
+ result := HandleInternalProxy(client)
36
37
+ if result.Transport.(*http.Transport).Proxy != nil {
38
+ proxyURL, _ := result.Transport.(*http.Transport).Proxy(nil)
39
+ t.Logf("Proxy URL set: %v", proxyURL)
40
+ } else {
41
+ t.Log("No proxy set")
42
+ }
43
+}
0 commit comments