Skip to content

Commit 8375163

Browse files
committed
Add test to validate non empty pod log dir
Signed-off-by: Maksym Pavlenko <[email protected]>
1 parent ae0a813 commit 8375163

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -569,6 +569,13 @@ func TestValidateKubeletConfiguration(t *testing.T) {
569569
return conf
570570
},
571571
errMsg: "invalid configuration: containerLogMonitorInterval must be a positive time duration greater than or equal to 3s",
572+
}, {
573+
name: "pod logs path must be not empty",
574+
configure: func(config *kubeletconfig.KubeletConfiguration) *kubeletconfig.KubeletConfiguration {
575+
config.PodLogsDir = ""
576+
return config
577+
},
578+
errMsg: "invalid configuration: podLogsDir was not specified",
572579
}, {
573580
name: "pod logs path must be absolute",
574581
configure: func(config *kubeletconfig.KubeletConfiguration) *kubeletconfig.KubeletConfiguration {

0 commit comments

Comments
 (0)