Merge pull request #128398 from tenzen-y/remaining-job-tracking-annotation-testing

Job: Remove JobTrackingFinalizer annotation specific testings
This commit is contained in:
Kubernetes Prow Robot 2025-01-07 06:26:28 +01:00 committed by GitHub
commit 38fab70477
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -988,49 +988,6 @@ func TestJobStrategy_ValidateUpdate(t *testing.T) {
{Type: field.ErrorTypeInvalid, Field: "spec.completions"},
},
},
"preserving tracking annotation": {
job: &batch.Job{
ObjectMeta: metav1.ObjectMeta{
Name: "myjob",
Namespace: metav1.NamespaceDefault,
ResourceVersion: "0",
Annotations: map[string]string{
batch.JobTrackingFinalizer: "",
},
},
Spec: batch.JobSpec{
Selector: validSelector,
Template: validPodTemplateSpec,
ManualSelector: ptr.To(true),
Parallelism: ptr.To[int32](1),
},
},
update: func(job *batch.Job) {
job.Annotations["foo"] = "bar"
},
},
"deleting user annotation": {
job: &batch.Job{
ObjectMeta: metav1.ObjectMeta{
Name: "myjob",
Namespace: metav1.NamespaceDefault,
ResourceVersion: "0",
Annotations: map[string]string{
batch.JobTrackingFinalizer: "",
"foo": "bar",
},
},
Spec: batch.JobSpec{
Selector: validSelector,
Template: validPodTemplateSpec,
ManualSelector: ptr.To(true),
Parallelism: ptr.To[int32](1),
},
},
update: func(job *batch.Job) {
delete(job.Annotations, "foo")
},
},
"updating node selector for unsuspended job disallowed": {
job: &batch.Job{
ObjectMeta: metav1.ObjectMeta{