INNER CODE UNIT · Go
TestIsSameKubeConfigAlreadyExist
sunny0826/kubecm · cmd/add_test.go:581
func TestIsSameKubeConfigAlreadyExist(t *testing.T) {
oldCfg := &clientcmdapi.Config{
Clusters: map[string]*clientcmdapi.Cluster{
"test-cluster": {
Server: "https://test.example.org",
CertificateAuthority: "/fake/ca/path",
CertificateAuthorityData: []byte("fake-ca-data"),
InsecureSkipTLSVerify: false,
},
},
AuthInfos: map[string]*clientcmdapi.AuthInfo{
"test-authinfo": {Token: "test-token"},
},
Contexts: map[string]*clientcmdapi.Context{
"test-context": {
AuthInfo: "test-authinfo",
Cluster: "test-cluster",
Namespace: "test-namespace",