INNER CODE UNIT · Go
TestKubeConfig_handleContext
sunny0826/kubecm · cmd/add_test.go:236
func TestKubeConfig_handleContext(t *testing.T) {
newConfig := addTestConfig.DeepCopy()
testCtx := clientcmdapi.Context{AuthInfo: "red-user", Cluster: "cow-cluster", Namespace: "hammer-ns"}
testNotExistCtx := clientcmdapi.Context{AuthInfo: "not-exist", Cluster: "not-exist", Namespace: "not-exist-ns"}
type fields struct {
config *clientcmdapi.Config
}
type args struct {
key string
ctx *clientcmdapi.Context
}
tests := []struct {
name string
fields fields
args args
want *clientcmdapi.Config
}{