INNER CODE UNIT · Go

TestAddToLocal_InsecureSkipTLSVerify

sunny0826/kubecm · cmd/add_test.go:461

func TestAddToLocal_InsecureSkipTLSVerify(t *testing.T) {
	oldCfg := clientcmdapi.Config{
		Contexts: map[string]*clientcmdapi.Context{
			"old-context": {AuthInfo: "old-user", Cluster: "old-cluster"},
		},
		AuthInfos: map[string]*clientcmdapi.AuthInfo{
			"old-user": {},
		},
		Clusters: map[string]*clientcmdapi.Cluster{
			"old-cluster": {Server: "https://old.example.org"},
		},
		CurrentContext: "old-context",
	}

	oldFile, err := os.CreateTemp("", "old-kubeconfig-*.yaml")
	if err != nil {
		t.Fatalf("failed to create temp file for old config: %v", err)
	}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…