mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 20:24:09 +00:00
add windows mount path test
This commit is contained in:
parent
3e1f81d97b
commit
544a09b30f
@ -3707,6 +3707,9 @@ func TestValidateVolumeMounts(t *testing.T) {
|
||||
{Name: "abc-123", MountPath: "/baz"},
|
||||
{Name: "abc-123", MountPath: "/baa", SubPath: ""},
|
||||
{Name: "abc-123", MountPath: "/bab", SubPath: "baz"},
|
||||
{Name: "abc-123", MountPath: "d:", SubPath: ""},
|
||||
{Name: "abc-123", MountPath: "F:", SubPath: ""},
|
||||
{Name: "abc-123", MountPath: "G:\\mount", SubPath: ""},
|
||||
{Name: "abc-123", MountPath: "/bac", SubPath: ".baz"},
|
||||
{Name: "abc-123", MountPath: "/bad", SubPath: "..baz"},
|
||||
}
|
||||
@ -3721,6 +3724,7 @@ func TestValidateVolumeMounts(t *testing.T) {
|
||||
"relative mountpath": {{Name: "abc", MountPath: "bar"}},
|
||||
"mountpath collision": {{Name: "foo", MountPath: "/path/a"}, {Name: "bar", MountPath: "/path/a"}},
|
||||
"absolute subpath": {{Name: "abc", MountPath: "/bar", SubPath: "/baz"}},
|
||||
"windows absolute subpath": {{Name: "abc", MountPath: "D", SubPath: ""}},
|
||||
"subpath in ..": {{Name: "abc", MountPath: "/bar", SubPath: "../baz"}},
|
||||
"subpath contains ..": {{Name: "abc", MountPath: "/bar", SubPath: "baz/../bat"}},
|
||||
"subpath ends in ..": {{Name: "abc", MountPath: "/bar", SubPath: "./.."}},
|
||||
|
Loading…
Reference in New Issue
Block a user