Skip to content

Commit

Permalink
Clean up the ugliest unit test ever
Browse files Browse the repository at this point in the history
This volume-validation test was a disaster.  Better now, if longer to
scroll-through.
  • Loading branch information
thockin committed Aug 1, 2016
1 parent 54e92bb commit ef4bccf
Show file tree
Hide file tree
Showing 2 changed files with 936 additions and 265 deletions.
1 change: 1 addition & 0 deletions pkg/api/validation/validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading

0 comments on commit ef4bccf

Please sign in to comment.