mirror of
https://github.com/kubernetes/client-go.git
synced 2025-09-06 01:20:40 +00:00
Exclude custom transports when constructing AnonymousClientConfig()
Kubernetes-commit: 05b764dbe3e0f979f1d17293a13bafda688d5951
This commit is contained in:
committed by
Kubernetes Publisher
parent
5e968874f2
commit
f570226af0
@@ -280,15 +280,9 @@ func TestAnonymousConfig(t *testing.T) {
|
||||
expected.TLSClientConfig.CertFile = ""
|
||||
expected.TLSClientConfig.KeyData = nil
|
||||
expected.TLSClientConfig.KeyFile = ""
|
||||
expected.Transport = nil
|
||||
expected.WrapTransport = nil
|
||||
|
||||
// The DeepEqual cannot handle the func comparison, so we just verify if the
|
||||
// function return the expected object.
|
||||
if actual.WrapTransport == nil || !reflect.DeepEqual(expected.WrapTransport(nil), &fakeRoundTripper{}) {
|
||||
t.Fatalf("AnonymousClientConfig dropped the WrapTransport field")
|
||||
} else {
|
||||
actual.WrapTransport = nil
|
||||
expected.WrapTransport = nil
|
||||
}
|
||||
if actual.Dial != nil {
|
||||
_, actualError := actual.Dial(context.Background(), "", "")
|
||||
_, expectedError := expected.Dial(context.Background(), "", "")
|
||||
|
Reference in New Issue
Block a user