Adding defaults to Deployment

This commit is contained in:
nikhiljindal
2015-09-01 02:48:53 -07:00
parent f7123ac8c6
commit 30a58321e8
13 changed files with 253 additions and 77 deletions

View File

@@ -572,6 +572,7 @@ func validDeployment() *expapi.Deployment {
},
},
},
UniqueLabelKey: "my-label",
},
}
}
@@ -606,8 +607,7 @@ func TestValidateDeployment(t *testing.T) {
// invalid unique label key.
invalidUniqueLabelDeployment := validDeployment()
invalidUniqueLabel := "abc/def/ghi"
invalidUniqueLabelDeployment.Spec.UniqueLabelKey = &invalidUniqueLabel
invalidUniqueLabelDeployment.Spec.UniqueLabelKey = "abc/def/ghi"
errorCases["spec.uniqueLabel: invalid value"] = invalidUniqueLabelDeployment
// rollingUpdate should be nil for recreate.