Sync the expiration time of kubeconfig cert file of the cluster

This commit is contained in:
Xinzhao Xu
2021-12-30 16:12:47 +08:00
parent f0210193c1
commit 7bbefdd30c
5 changed files with 85 additions and 22 deletions

View File

@@ -41,6 +41,7 @@ import (
"kubesphere.io/kubesphere/pkg/client/clientset/versioned/fake"
"kubesphere.io/kubesphere/pkg/informers"
"kubesphere.io/kubesphere/pkg/utils/k8sutil"
"kubesphere.io/kubesphere/pkg/version"
)
@@ -339,7 +340,7 @@ func TestValidateKubeConfig(t *testing.T) {
"",
agentImage)
config, err := loadKubeConfigFromBytes([]byte(base64EncodedKubeConfig))
config, err := k8sutil.LoadKubeConfigFromBytes([]byte(base64EncodedKubeConfig))
if err != nil {
t.Fatal(err)
}
@@ -415,7 +416,7 @@ func TestValidateMemberClusterConfiguration(t *testing.T) {
"",
agentImage)
config, err := loadKubeConfigFromBytes([]byte(base64EncodedKubeConfig))
config, err := k8sutil.LoadKubeConfigFromBytes([]byte(base64EncodedKubeConfig))
if err != nil {
t.Fatal(err)
}