Skip to content

Commit 38fab70

Browse files
authored
Merge pull request kubernetes#128398 from tenzen-y/remaining-job-tracking-annotation-testing
Job: Remove JobTrackingFinalizer annotation specific testings
2 parents 2e53799 + e5fd9cf commit 38fab70

File tree

1 file changed

+0
-43
lines changed

1 file changed

+0
-43
lines changed

pkg/registry/batch/job/strategy_test.go

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -988,49 +988,6 @@ func TestJobStrategy_ValidateUpdate(t *testing.T) {
988988
{Type: field.ErrorTypeInvalid, Field: "spec.completions"},
989989
},
990990
},
991-
"preserving tracking annotation": {
992-
job: &batch.Job{
993-
ObjectMeta: metav1.ObjectMeta{
994-
Name: "myjob",
995-
Namespace: metav1.NamespaceDefault,
996-
ResourceVersion: "0",
997-
Annotations: map[string]string{
998-
batch.JobTrackingFinalizer: "",
999-
},
1000-
},
1001-
Spec: batch.JobSpec{
1002-
Selector: validSelector,
1003-
Template: validPodTemplateSpec,
1004-
ManualSelector: ptr.To(true),
1005-
Parallelism: ptr.To[int32](1),
1006-
},
1007-
},
1008-
update: func(job *batch.Job) {
1009-
job.Annotations["foo"] = "bar"
1010-
},
1011-
},
1012-
"deleting user annotation": {
1013-
job: &batch.Job{
1014-
ObjectMeta: metav1.ObjectMeta{
1015-
Name: "myjob",
1016-
Namespace: metav1.NamespaceDefault,
1017-
ResourceVersion: "0",
1018-
Annotations: map[string]string{
1019-
batch.JobTrackingFinalizer: "",
1020-
"foo": "bar",
1021-
},
1022-
},
1023-
Spec: batch.JobSpec{
1024-
Selector: validSelector,
1025-
Template: validPodTemplateSpec,
1026-
ManualSelector: ptr.To(true),
1027-
Parallelism: ptr.To[int32](1),
1028-
},
1029-
},
1030-
update: func(job *batch.Job) {
1031-
delete(job.Annotations, "foo")
1032-
},
1033-
},
1034991
"updating node selector for unsuspended job disallowed": {
1035992
job: &batch.Job{
1036993
ObjectMeta: metav1.ObjectMeta{

0 commit comments

Comments
 (0)