diff --git a/cmd/kubeadm/app/preflight/checks_test.go b/cmd/kubeadm/app/preflight/checks_test.go index cfc7bd4bb8d..c600c8d1b47 100644 --- a/cmd/kubeadm/app/preflight/checks_test.go +++ b/cmd/kubeadm/app/preflight/checks_test.go @@ -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 }, }, } diff --git a/cmd/kubeadm/app/preflight/utils_test.go b/cmd/kubeadm/app/preflight/utils_test.go index ac52e481226..a39eab77dbf 100644 --- a/cmd/kubeadm/app/preflight/utils_test.go +++ b/cmd/kubeadm/app/preflight/utils_test.go @@ -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 }, }, }