Merge pull request #32613 from madhusudancs/fed-clientcmd-bug-31947-fix

Automatic merge from submit-queue

Fix clientcmd for a non-host cluster client running in a pod. 

This is based on @errordeveloper's PR #32438. It fixes a case where default config is invalid and original config, i.e. `mergedConfig` is empty. It also adds a test for the case where default config is invalid and original config is neither invalid nor empty.

cc @errordeveloper @kubernetes/sig-cluster-federation @pwittrock @colhom
This commit is contained in:
Kubernetes Submit Queue
2016-09-14 13:10:27 -07:00
committed by GitHub
2 changed files with 15 additions and 2 deletions

View File

@@ -174,6 +174,16 @@ func TestInClusterConfig(t *testing.T) {
result: config2,
err: nil,
},
"in-cluster not checked when default is invalid": {
defaultConfig: &DefaultClientConfig,
clientConfig: &testClientConfig{config: config2},
icc: &testICC{},
checkedICC: false,
result: config2,
err: nil,
},
}
for name, test := range testCases {