Validate volume paths do not have ':'

This commit is contained in:
Tim Hockin
2016-02-29 13:22:45 -08:00
parent d1d036391a
commit 56be551416
10 changed files with 14 additions and 10 deletions

View File

@@ -1134,6 +1134,7 @@ func TestValidateVolumeMounts(t *testing.T) {
"empty name": {{Name: "", MountPath: "/foo"}},
"name not found": {{Name: "", MountPath: "/foo"}},
"empty mountpath": {{Name: "abc", MountPath: ""}},
"colon mountpath": {{Name: "abc", MountPath: "foo:bar"}},
}
for k, v := range errorCases {
if errs := validateVolumeMounts(v, volumes, field.NewPath("field")); len(errs) == 0 {