mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-04 18:00:08 +00:00
Clean up the ugliest unit test ever
This volume-validation test was a disaster. Better now, if longer to scroll-through.
This commit is contained in:
parent
54e92bbc49
commit
ef4bccf63e
@ -778,6 +778,7 @@ func validateLocalDescendingPath(targetPath string, fldPath *field.Path) field.E
|
|||||||
for _, item := range parts {
|
for _, item := range parts {
|
||||||
if item == ".." {
|
if item == ".." {
|
||||||
allErrs = append(allErrs, field.Invalid(fldPath, targetPath, "must not contain '..'"))
|
allErrs = append(allErrs, field.Invalid(fldPath, targetPath, "must not contain '..'"))
|
||||||
|
break // even for `../../..`, one error is sufficient to make the point
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return allErrs
|
return allErrs
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user