mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-12 12:48:51 +00:00
kubeadm: update unit tests to support dynamic version updates
Tests under /app and /test would fail if the current/minimum k8s version is dynamically populated from the version in the kubeadm binary. Adapt the tests to support that.
This commit is contained in:
@@ -793,7 +793,7 @@ func TestKubeletVersionCheck(t *testing.T) {
|
||||
expectWarnings bool
|
||||
}{
|
||||
{"v" + constants.CurrentKubernetesVersion.WithPatch(2).String(), "", false, false}, // check minimally supported version when there is no information about control plane
|
||||
{"v1.11.3", "v1.11.8", true, false}, // too old kubelet (older than kubeadmconstants.MinimumKubeletVersion), should fail.
|
||||
{"v1.1.0", "v1.11.8", true, false}, // too old kubelet, should fail.
|
||||
{"v" + constants.MinimumKubeletVersion.String(), constants.MinimumControlPlaneVersion.WithPatch(5).String(), false, false}, // kubelet within same major.minor as control plane
|
||||
{"v" + constants.MinimumKubeletVersion.WithPatch(5).String(), constants.MinimumControlPlaneVersion.WithPatch(1).String(), false, false}, // kubelet is newer, but still within same major.minor as control plane
|
||||
{"v" + constants.MinimumKubeletVersion.String(), constants.CurrentKubernetesVersion.WithPatch(1).String(), false, false}, // kubelet is lower than control plane, but newer than minimally supported
|
||||
|
Reference in New Issue
Block a user