kubeadm: re-enable kubelet version check test in preflight

This commit is contained in:
SataQiu 2019-12-22 16:49:39 +08:00
parent 2d310b1321
commit 107db83839
2 changed files with 2 additions and 12 deletions

View File

@ -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 },
},
}

View File

@ -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 },
},
}