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:
Tim Hockin 2016-07-29 23:52:25 -07:00
parent 54e92bbc49
commit ef4bccf63e
2 changed files with 936 additions and 265 deletions

View File

@ -778,6 +778,7 @@ func validateLocalDescendingPath(targetPath string, fldPath *field.Path) field.E
for _, item := range parts {
if item == ".." {
allErrs = append(allErrs, field.Invalid(fldPath, targetPath, "must not contain '..'"))
break // even for `../../..`, one error is sufficient to make the point
}
}
return allErrs

File diff suppressed because it is too large Load Diff