Merge pull request #86519 from SataQiu/re-enable-kubelet-version-check

kubeadm: re-enable kubelet version check test in preflight
This commit is contained in:
Kubernetes Prow Robot 2019-12-22 17:15:32 -08:00 committed by GitHub
commit aab1bef8c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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 },
},
}