Skip to content

Commit

Permalink
fix go unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
bschimke95 committed Dec 5, 2024
1 parent c328654 commit 77b5b7d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/k8s/pkg/k8sd/setup/kube_apiserver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ func TestKubeAPIServer(t *testing.T) {
{key: "--kubelet-client-certificate", expectedVal: filepath.Join(s.Mock.KubernetesPKIDir, "apiserver-kubelet-client.crt")},
{key: "--kubelet-client-key", expectedVal: filepath.Join(s.Mock.KubernetesPKIDir, "apiserver-kubelet-client.key")},
{key: "--kubelet-preferred-address-types", expectedVal: "InternalIP,Hostname,InternalDNS,ExternalDNS,ExternalIP"},
{key: "--feature-gates", expectedVal: "WatchList=false"},
{key: "--profiling", expectedVal: "false"},
{key: "--secure-port", expectedVal: "6443"},
{key: "--service-account-issuer", expectedVal: "https://kubernetes.default.svc"},
Expand Down Expand Up @@ -115,6 +116,7 @@ func TestKubeAPIServer(t *testing.T) {
{key: "--kubelet-client-certificate", expectedVal: filepath.Join(s.Mock.KubernetesPKIDir, "apiserver-kubelet-client.crt")},
{key: "--kubelet-client-key", expectedVal: filepath.Join(s.Mock.KubernetesPKIDir, "apiserver-kubelet-client.key")},
{key: "--kubelet-preferred-address-types", expectedVal: "InternalIP,Hostname,InternalDNS,ExternalDNS,ExternalIP"},
{key: "--feature-gates", expectedVal: "WatchList=false"},
{key: "--profiling", expectedVal: "false"},
{key: "--request-timeout", expectedVal: "300s"},
{key: "--secure-port", expectedVal: "6443"},
Expand Down Expand Up @@ -172,6 +174,7 @@ func TestKubeAPIServer(t *testing.T) {
{key: "--kubelet-client-certificate", expectedVal: filepath.Join(s.Mock.KubernetesPKIDir, "apiserver-kubelet-client.crt")},
{key: "--kubelet-client-key", expectedVal: filepath.Join(s.Mock.KubernetesPKIDir, "apiserver-kubelet-client.key")},
{key: "--kubelet-preferred-address-types", expectedVal: "InternalIP,Hostname,InternalDNS,ExternalDNS,ExternalIP"},
{key: "--feature-gates", expectedVal: "WatchList=false"},
{key: "--profiling", expectedVal: "false"},
{key: "--secure-port", expectedVal: "1337"},
{key: "--service-account-issuer", expectedVal: "https://kubernetes.default.svc"},
Expand Down
3 changes: 2 additions & 1 deletion src/k8s/pkg/k8sd/types/cluster_config_datastore_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ func TestDatastoreToKubeAPIServerArguments(t *testing.T) {
Type: utils.Pointer("k8s-dqlite"),
},
expectUpdateArgs: map[string]string{
"--etcd-servers": "unix:///k8s-dqlite/k8s-dqlite.sock",
"--etcd-servers": "unix:///k8s-dqlite/k8s-dqlite.sock",
"--feature-gates": "WatchList=false",
},
expectDeleteArgs: []string{"--etcd-cafile", "--etcd-certfile", "--etcd-keyfile"},
},
Expand Down

0 comments on commit 77b5b7d

Please sign in to comment.