Commit ef4bccf6 authored by Tim Hockin's avatar Tim Hockin

Clean up the ugliest unit test ever

This volume-validation test was a disaster. Better now, if longer to scroll-through.
parent 54e92bbc
...@@ -778,6 +778,7 @@ func validateLocalDescendingPath(targetPath string, fldPath *field.Path) field.E ...@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment