Merge pull request #11396 from dinever/fix-test-kubernetes-upgrade
Fix TestKubernetesUpgradepull/11405/head
commit
0b1e8cec51
|
@ -562,6 +562,7 @@ func updateExistingConfigFromFlags(cmd *cobra.Command, existing *config.ClusterC
|
|||
updateIntFromFlag(cmd, &cc.SSHPort, sshSSHPort)
|
||||
updateStringFromFlag(cmd, &cc.KubernetesConfig.Namespace, startNamespace)
|
||||
updateStringFromFlag(cmd, &cc.KubernetesConfig.APIServerName, apiServerName)
|
||||
updateStringSliceFromFlag(cmd, &cc.KubernetesConfig.APIServerNames, "apiserver-names")
|
||||
updateStringFromFlag(cmd, &cc.KubernetesConfig.DNSDomain, dnsDomain)
|
||||
updateStringFromFlag(cmd, &cc.KubernetesConfig.FeatureGates, featureGates)
|
||||
updateStringFromFlag(cmd, &cc.KubernetesConfig.ContainerRuntime, containerRuntime)
|
||||
|
@ -571,6 +572,10 @@ func updateExistingConfigFromFlags(cmd *cobra.Command, existing *config.ClusterC
|
|||
updateBoolFromFlag(cmd, &cc.KubernetesConfig.ShouldLoadCachedImages, cacheImages)
|
||||
updateIntFromFlag(cmd, &cc.KubernetesConfig.NodePort, apiServerPort)
|
||||
|
||||
if cmd.Flags().Changed(kubernetesVersion) {
|
||||
cc.KubernetesConfig.KubernetesVersion = getKubernetesVersion(existing)
|
||||
}
|
||||
|
||||
if cmd.Flags().Changed("extra-config") {
|
||||
cc.KubernetesConfig.ExtraOptions = config.ExtraOptions
|
||||
}
|
||||
|
|
|
@ -266,7 +266,7 @@ func TestKubernetesUpgrade(t *testing.T) {
|
|||
}
|
||||
|
||||
if cv.ServerVersion.GitVersion != constants.NewestKubernetesVersion {
|
||||
t.Fatalf("expected server version %s is not the same with latest version %s", cv.ServerVersion.GitVersion, constants.NewestKubernetesVersion)
|
||||
t.Fatalf("server version %s is not the same with the expected version %s after upgrade", cv.ServerVersion.GitVersion, constants.NewestKubernetesVersion)
|
||||
}
|
||||
|
||||
t.Logf("Attempting to downgrade Kubernetes (should fail)")
|
||||
|
|
Loading…
Reference in New Issue