Skip to content

Commit 9b5d271

Browse files
fix(test): add FailureTarget condition to job & add startTime.
Signed-off-by: Electronic-Waste <[email protected]>
1 parent 486c816 commit 9b5d271

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pkg/controller.v1beta1/trial/trial_controller_test.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,13 +208,20 @@ func TestReconcileBatchJob(t *testing.T) {
208208
g.Expect(c.Get(ctx, batchJobKey, batchJob)).Should(gomega.Succeed())
209209
batchJob.Status = batchv1.JobStatus{
210210
Conditions: []batchv1.JobCondition{
211+
{
212+
Type: batchv1.JobFailureTarget,
213+
Status: corev1.ConditionTrue,
214+
Message: "BatchJob failed test message",
215+
Reason: "BatchJob failed test reason",
216+
},
211217
{
212218
Type: batchv1.JobFailed,
213219
Status: corev1.ConditionTrue,
214220
Message: "BatchJob failed test message",
215221
Reason: "BatchJob failed test reason",
216222
},
217223
},
224+
StartTime: &metav1.Time{Time: time.Now()},
218225
}
219226
g.Expect(c.Status().Update(ctx, batchJob)).Should(gomega.Succeed())
220227
g.Expect(c.Get(ctx, trialKey, trial)).Should(gomega.Succeed())

0 commit comments

Comments
 (0)