Skip to content

Commit 2cb9e77

Browse files
authored
Merge pull request kubernetes#130658 from tenzen-y/promote-successpolicy-e2e-to-conformance
KEP-3998: Promote JobSuccessPolicy E2E to Conformance
2 parents 61529d5 + e394d43 commit 2cb9e77

File tree

2 files changed

+41
-9
lines changed

2 files changed

+41
-9
lines changed

test/conformance/testdata/conformance.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1154,6 +1154,32 @@
11541154
exceeds maxFailedIndexes.
11551155
release: v1.33
11561156
file: test/e2e/apps/job.go
1157+
- testname: Ensure that job with successPolicy succeeded when all indexes succeeded
1158+
codename: '[sig-apps] Job with successPolicy should succeeded when all indexes succeeded
1159+
[Conformance]'
1160+
description: Create an indexed job with successPolicy. Verify that job got SuccessCriteriaMet
1161+
with SuccessPolicy reason and Complete condition once all indexes succeeded.
1162+
release: v1.33
1163+
file: test/e2e/apps/job.go
1164+
- testname: Ensure that job with successPolicy succeededCount rule succeeded even
1165+
when some indexes remain pending
1166+
codename: '[sig-apps] Job with successPolicy succeededCount rule should succeeded
1167+
even when some indexes remain pending [Conformance]'
1168+
description: Create an indexed job with successPolicy succeededCount rule. Verify
1169+
that the job got the SuccessCriteriaMet with SuccessPolicy reason condition and
1170+
Complete condition when the job met successPolicy even if some indexed remain
1171+
pending.
1172+
release: v1.33
1173+
file: test/e2e/apps/job.go
1174+
- testname: Ensure that job with successPolicy succeededIndexes rule succeeded even
1175+
when some indexes remain pending
1176+
codename: '[sig-apps] Job with successPolicy succeededIndexes rule should succeeded
1177+
even when some indexes remain pending [Conformance]'
1178+
description: Create an indexed job with successPolicy succeededIndexes rule. Verify
1179+
that the job got SuccessCriteriaMet with SuccessPolicy reason condition and Complete
1180+
condition when the job met successPolicy even if some indexed remain pending.
1181+
release: v1.33
1182+
file: test/e2e/apps/job.go
11571183
- testname: ReplicaSet, is created, Replaced and Patched
11581184
codename: '[sig-apps] ReplicaSet Replace and Patch tests [Conformance]'
11591185
description: Create a ReplicaSet (RS) with a single Pod. The Pod MUST be verified

test/e2e/apps/job.go

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -476,12 +476,13 @@ done`}
476476
})
477477

478478
/*
479-
Testcase: Ensure that job with successPolicy succeeded when all indexes succeeded
479+
Release: v1.33
480+
Testname: Ensure that job with successPolicy succeeded when all indexes succeeded
480481
Description: Create an indexed job with successPolicy.
481482
Verify that job got SuccessCriteriaMet with SuccessPolicy reason and Complete condition
482483
once all indexes succeeded.
483484
*/
484-
ginkgo.It("with successPolicy should succeeded when all indexes succeeded", func(ctx context.Context) {
485+
framework.ConformanceIt("with successPolicy should succeeded when all indexes succeeded", func(ctx context.Context) {
485486
parallelism := int32(2)
486487
completions := int32(2)
487488
backoffLimit := int32(6) // default value
@@ -510,17 +511,19 @@ done`}
510511
framework.ExpectNoError(err, "failed to get latest job object")
511512
gomega.Expect(job.Status.Active).Should(gomega.Equal(int32(0)))
512513
gomega.Expect(job.Status.Ready).Should(gomega.Equal(ptr.To[int32](0)))
513-
gomega.Expect(job.Status.Terminating).Should(gomega.Equal(ptr.To[int32](0)))
514+
// TODO (https://github.com/kubernetes/enhancements/issues/3939): Restore the assert on .status.terminating when PodReplacementPolicy goes GA.
515+
// gomega.Expect(job.Status.Terminating).Should(gomega.Equal(ptr.To[int32](0)))
514516
gomega.Expect(job.Status.Failed).Should(gomega.Equal(int32(0)))
515517
})
516518

517519
/*
518-
Testcase: Ensure that job with successPolicy succeededIndexes rule succeeded even when some indexes remain pending
520+
Release: v1.33
521+
Testname: Ensure that job with successPolicy succeededIndexes rule succeeded even when some indexes remain pending
519522
Description: Create an indexed job with successPolicy succeededIndexes rule.
520523
Verify that the job got SuccessCriteriaMet with SuccessPolicy reason condition and Complete condition
521524
when the job met successPolicy even if some indexed remain pending.
522525
*/
523-
ginkgo.It("with successPolicy succeededIndexes rule should succeeded even when some indexes remain pending", func(ctx context.Context) {
526+
framework.ConformanceIt("with successPolicy succeededIndexes rule should succeeded even when some indexes remain pending", func(ctx context.Context) {
524527
parallelism := int32(2)
525528
completions := int32(5)
526529
backoffLimit := int32(6) // default value
@@ -550,16 +553,18 @@ done`}
550553
gomega.Expect(job.Status.CompletedIndexes).Should(gomega.Equal("0"))
551554
gomega.Expect(job.Status.Active).Should(gomega.Equal(int32(0)))
552555
gomega.Expect(job.Status.Ready).Should(gomega.Equal(ptr.To[int32](0)))
553-
gomega.Expect(job.Status.Terminating).Should(gomega.Equal(ptr.To[int32](0)))
556+
// TODO (https://github.com/kubernetes/enhancements/issues/3939): Restore the assert on .status.terminating when PodReplacementPolicy goes GA.
557+
// gomega.Expect(job.Status.Terminating).Should(gomega.Equal(ptr.To[int32](0)))
554558
})
555559

556560
/*
557-
Testcase: Ensure that job with successPolicy succeededCount rule succeeded even when some indexes remain pending
561+
Release: v1.33
562+
Testname: Ensure that job with successPolicy succeededCount rule succeeded even when some indexes remain pending
558563
Description: Create an indexed job with successPolicy succeededCount rule.
559564
Verify that the job got the SuccessCriteriaMet with SuccessPolicy reason condition and Complete condition
560565
when the job met successPolicy even if some indexed remain pending.
561566
*/
562-
ginkgo.It("with successPolicy succeededCount rule should succeeded even when some indexes remain pending", func(ctx context.Context) {
567+
framework.ConformanceIt("with successPolicy succeededCount rule should succeeded even when some indexes remain pending", func(ctx context.Context) {
563568
parallelism := int32(2)
564569
completions := int32(5)
565570
backoffLimit := int32(math.MaxInt32)
@@ -589,7 +594,8 @@ done`}
589594
gomega.Expect(job.Status.CompletedIndexes).Should(gomega.Equal("0"))
590595
gomega.Expect(job.Status.Active).Should(gomega.Equal(int32(0)))
591596
gomega.Expect(job.Status.Ready).Should(gomega.Equal(ptr.To[int32](0)))
592-
gomega.Expect(job.Status.Terminating).Should(gomega.Equal(ptr.To[int32](0)))
597+
// TODO (https://github.com/kubernetes/enhancements/issues/3939): Restore the assert on .status.terminating when PodReplacementPolicy goes GA.
598+
// gomega.Expect(job.Status.Terminating).Should(gomega.Equal(ptr.To[int32](0)))
593599
})
594600

595601
/*

0 commit comments

Comments
 (0)