Merge pull request #1678 from janetkuo/fix-examples-test-cronjob

Fix example test failure: rename ScheduledJob to CronJob
pull/1656/head^2
Janet Kuo 2016-11-14 13:50:30 -08:00 committed by GitHub
commit 0e041b55bc
1 changed files with 4 additions and 4 deletions

View File

@ -127,11 +127,11 @@ func validateObject(obj runtime.Object) (errors field.ErrorList) {
t.Namespace = api.NamespaceDefault
}
errors = expvalidation.ValidateDaemonSet(t)
case *batch.ScheduledJob:
case *batch.CronJob:
if t.Namespace == "" {
t.Namespace = api.NamespaceDefault
}
errors = batch_validation.ValidateScheduledJob(t)
errors = batch_validation.ValidateCronJob(t)
default:
errors = field.ErrorList{}
errors = append(errors, field.InternalError(field.NewPath(""), fmt.Errorf("no validation defined for %#v", obj)))
@ -242,7 +242,7 @@ func TestExampleObjectSchemas(t *testing.T) {
"redis-resource-deployment": &extensions.Deployment{},
"redis-secret-deployment": &extensions.Deployment{},
"run-my-nginx": &extensions.Deployment{},
"sj": &batch.ScheduledJob{},
"sj": &batch.CronJob{},
},
"../docs/admin": {
"daemon": &extensions.DaemonSet{},