Skip to content

Commit 6c445ca

Browse files
authored
Merge pull request kubernetes#130122 from marosset/windows-unit-test-pkg-kubelet-apis-config-validation-fixes
unit tests - fixing k8s.io/kubernetes/pkg/kubelet/apis/config/validation unit test failures on Windows
2 parents 98e8539 + 7a1b2ae commit 6c445ca

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

pkg/kubelet/apis/config/validation/validation_test.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ limitations under the License.
1717
package validation_test
1818

1919
import (
20+
goruntime "runtime"
2021
"strings"
2122
"testing"
2223
"time"
@@ -81,7 +82,12 @@ var (
8182
ContainerLogMaxWorkers: 1,
8283
ContainerLogMaxFiles: 5,
8384
ContainerLogMonitorInterval: metav1.Duration{Duration: 10 * time.Second},
84-
SingleProcessOOMKill: ptr.To(!kubeletutil.IsCgroup2UnifiedMode()),
85+
SingleProcessOOMKill: func() *bool {
86+
if goruntime.GOOS == "linux" {
87+
return ptr.To(!kubeletutil.IsCgroup2UnifiedMode())
88+
}
89+
return nil
90+
}(),
8591
CrashLoopBackOff: kubeletconfig.CrashLoopBackOffConfig{
8692
MaxContainerRestartPeriod: &metav1.Duration{Duration: 3 * time.Second},
8793
},

0 commit comments

Comments
 (0)