Improve error message for name/label validation.

This patch added user readable naming rules to the output of
the error messages for name/label validation.
This commit is contained in:
Xing Zhou
2016-12-02 12:32:41 +08:00
parent 7e1cacaa91
commit cfe1599983
4 changed files with 66 additions and 40 deletions

View File

@@ -638,7 +638,7 @@ func TestValidateDeployment(t *testing.T) {
MaxSurge: intstr.FromString("20Percent"),
},
}
errorCases["must match the regex"] = invalidMaxSurgeDeployment
errorCases["a valid percent string must be"] = invalidMaxSurgeDeployment
// MaxSurge and MaxUnavailable cannot both be zero.
invalidRollingUpdateDeployment := validDeployment()