Added ActiveDeadlineSeconds to jobs, allowing failing a job after

exceeding allowed time.
This commit is contained in:
Maciej Szulik
2015-11-26 16:54:04 +01:00
parent efc821a14c
commit 327c104460
21 changed files with 16070 additions and 14806 deletions

View File

@@ -839,6 +839,7 @@ func TestValidateJob(t *testing.T) {
}
}
negative := -1
negative64 := int64(-1)
errorCases := map[string]extensions.Job{
"spec.parallelism:must be non-negative": {
ObjectMeta: api.ObjectMeta{
@@ -862,6 +863,17 @@ func TestValidateJob(t *testing.T) {
Template: validPodTemplateSpec,
},
},
"spec.activeDeadlineSeconds:must be non-negative": {
ObjectMeta: api.ObjectMeta{
Name: "myjob",
Namespace: api.NamespaceDefault,
},
Spec: extensions.JobSpec{
ActiveDeadlineSeconds: &negative64,
Selector: validSelector,
Template: validPodTemplateSpec,
},
},
"spec.selector:required value": {
ObjectMeta: api.ObjectMeta{
Name: "myjob",