mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 03:41:45 +00:00
Merge pull request #109473 from ii/fix-job-lifecycle-test
Fix crash in E2E Job lifecycle test when the job doesn't have annotations
This commit is contained in:
commit
8dfdbd406b
@ -577,6 +577,9 @@ var _ = SIGDescribe("Job", func() {
|
||||
patchedJob, err = jobClient.Get(context.TODO(), jobName, metav1.GetOptions{})
|
||||
framework.ExpectNoError(err, "Unable to get job %s", jobName)
|
||||
patchedJob.Spec.Suspend = pointer.BoolPtr(false)
|
||||
if patchedJob.Annotations == nil {
|
||||
patchedJob.Annotations = map[string]string{}
|
||||
}
|
||||
patchedJob.Annotations["updated"] = "true"
|
||||
updatedJob, err = e2ejob.UpdateJob(f.ClientSet, ns, patchedJob)
|
||||
return err
|
||||
|
Loading…
Reference in New Issue
Block a user