Commit ec5b2045 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #28816 from xiangpengzhao/add_test_comment

Automatic merge from submit-queue Unset https_proxy before roundtripper_test When running `hack/test-go.sh`, if the testing env is behind a https proxy, roundtripper_test will fail randomly. After `unset https_proxy`, the testing works well. So, add a comment to be a troubleshooting tip. Fail info: ``` --- FAIL: TestRoundTripAndNewConnection (0.12s) roundtripper_test.go:319: proxied http->http: shouldError=false, got true: Get http://127.0.0.1:46711: unexpected EOF FAIL FAIL k8s.io/kubernetes/pkg/util/httpstream/spdy 0.148s ``` ``` --- FAIL: TestRoundTripAndNewConnection (0.12s) roundtripper_test.go:319: proxied https with auth (valid hostname + RootCAs) -> http: shouldError=false, got true: Get http://127.0.0.1:41028: unexpected EOF FAIL FAIL k8s.io/kubernetes/pkg/util/httpstream/spdy 0.146s ```
parents a31aff85 4691ccf2
...@@ -30,6 +30,7 @@ import ( ...@@ -30,6 +30,7 @@ import (
"k8s.io/kubernetes/pkg/util/httpstream" "k8s.io/kubernetes/pkg/util/httpstream"
) )
// be sure to unset environment variable https_proxy (if exported) before testing, otherwise the testing will fail unexpectedly.
func TestRoundTripAndNewConnection(t *testing.T) { func TestRoundTripAndNewConnection(t *testing.T) {
localhostPool := x509.NewCertPool() localhostPool := x509.NewCertPool()
if !localhostPool.AppendCertsFromPEM(localhostCert) { if !localhostPool.AppendCertsFromPEM(localhostCert) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment