It is weird that lastScheduleTime is earlier than creationTime

Signed-off-by: sayaoailun <guojianwei007@126.com>
This commit is contained in:
sayaoailun 2022-01-13 14:07:38 +08:00
parent 559091ba4f
commit f2d585e356

View File

@ -191,7 +191,7 @@ var _ = SIGDescribe("CronJob", func() {
cronJob := newTestCronJob("concurrent", "*/1 * * * ?", batchv1.ForbidConcurrent,
sleepCommand, nil, nil)
creationTime := time.Now().Add(-99 * 24 * time.Hour)
lastScheduleTime := creationTime.Add(-1 * 24 * time.Hour)
lastScheduleTime := creationTime.Add(1 * 24 * time.Hour)
cronJob.CreationTimestamp = metav1.Time{Time: creationTime}
cronJob.Status.LastScheduleTime = &metav1.Time{Time: lastScheduleTime}
cronJob, err := createCronJob(f.ClientSet, f.Namespace.Name, cronJob)