mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 03:41:45 +00:00
kubeadm: re-enable kubelet version check test in preflight
This commit is contained in:
parent
2d310b1321
commit
107db83839
@ -671,11 +671,6 @@ func restoreEnv(e map[string]string) {
|
||||
}
|
||||
|
||||
func TestKubeletVersionCheck(t *testing.T) {
|
||||
// TODO: Re-enable this test
|
||||
// fakeexec.FakeCmd supports only combined output.
|
||||
// Hence .Output() returns a "not supported" error and we cannot use it for the test ATM.
|
||||
t.Skip()
|
||||
|
||||
cases := []struct {
|
||||
kubeletVersion string
|
||||
k8sVersion string
|
||||
@ -694,7 +689,7 @@ func TestKubeletVersionCheck(t *testing.T) {
|
||||
for _, tc := range cases {
|
||||
t.Run(tc.kubeletVersion, func(t *testing.T) {
|
||||
fcmd := fakeexec.FakeCmd{
|
||||
CombinedOutputScript: []fakeexec.FakeAction{
|
||||
OutputScript: []fakeexec.FakeAction{
|
||||
func() ([]byte, []byte, error) { return []byte("Kubernetes " + tc.kubeletVersion), nil, nil },
|
||||
},
|
||||
}
|
||||
|
@ -26,11 +26,6 @@ import (
|
||||
)
|
||||
|
||||
func TestGetKubeletVersion(t *testing.T) {
|
||||
// TODO: Re-enable this test
|
||||
// fakeexec.FakeCmd supports only combined output.
|
||||
// Hence .Output() returns a "not supported" error and we cannot use it for the test ATM.
|
||||
t.Skip()
|
||||
|
||||
cases := []struct {
|
||||
output string
|
||||
expected string
|
||||
@ -47,7 +42,7 @@ func TestGetKubeletVersion(t *testing.T) {
|
||||
for _, tc := range cases {
|
||||
t.Run(tc.output, func(t *testing.T) {
|
||||
fcmd := fakeexec.FakeCmd{
|
||||
CombinedOutputScript: []fakeexec.FakeAction{
|
||||
OutputScript: []fakeexec.FakeAction{
|
||||
func() ([]byte, []byte, error) { return []byte(tc.output), nil, tc.err },
|
||||
},
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user