extensions: invalidate progress deadline less than minreadyseconds

This commit is contained in:
Michail Kargakis
2016-11-04 14:16:26 +01:00
parent 5a2c473c1c
commit 365cfa1ef3
2 changed files with 10 additions and 0 deletions

View File

@@ -666,6 +666,13 @@ func TestValidateDeployment(t *testing.T) {
invalidRollbackRevisionDeployment.Spec.RollbackTo.Revision = -3
errorCases["must be greater than or equal to 0"] = invalidRollbackRevisionDeployment
// ProgressDeadlineSeconds should be greater than MinReadySeconds
invalidProgressDeadlineDeployment := validDeployment()
seconds := int32(600)
invalidProgressDeadlineDeployment.Spec.ProgressDeadlineSeconds = &seconds
invalidProgressDeadlineDeployment.Spec.MinReadySeconds = seconds
errorCases["must be greater than minReadySeconds"] = invalidProgressDeadlineDeployment
for k, v := range errorCases {
errs := ValidateDeployment(v)
if len(errs) == 0 {