Merge pull request #125482 from mimowo/failure-policy-e2e-conformance
Promote JobPodFailurePolicy and PodDisruptionConditions e2e tests to Conformance
This commit is contained in:
		
							
								
								
									
										17
									
								
								test/conformance/testdata/conformance.yaml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										17
									
								
								test/conformance/testdata/conformance.yaml
									
									
									
									
										vendored
									
									
								
							@@ -1055,6 +1055,14 @@
 | 
				
			|||||||
    pod. Modify the labels of one of the Job's Pods. The Job MUST release the Pod.
 | 
					    pod. Modify the labels of one of the Job's Pods. The Job MUST release the Pod.
 | 
				
			||||||
  release: v1.16
 | 
					  release: v1.16
 | 
				
			||||||
  file: test/e2e/apps/job.go
 | 
					  file: test/e2e/apps/job.go
 | 
				
			||||||
 | 
					- testname: Verify Pod Failure policy allows to fail job early on exit code.
 | 
				
			||||||
 | 
					  codename: '[sig-apps] Job should allow to use the pod failure policy on exit code
 | 
				
			||||||
 | 
					    to fail the job early [Conformance]'
 | 
				
			||||||
 | 
					  description: Create a job with pod failure policy, and exactly one pod failing.
 | 
				
			||||||
 | 
					    The exit code of the failed pod matches the pod failure policy triggering the
 | 
				
			||||||
 | 
					    Job failure.
 | 
				
			||||||
 | 
					  release: v1.31
 | 
				
			||||||
 | 
					  file: test/e2e/apps/job.go
 | 
				
			||||||
- testname: Jobs, apply changes to status
 | 
					- testname: Jobs, apply changes to status
 | 
				
			||||||
  codename: '[sig-apps] Job should apply changes to a job status [Conformance]'
 | 
					  codename: '[sig-apps] Job should apply changes to a job status [Conformance]'
 | 
				
			||||||
  description: Attempt to create a running Job which MUST succeed. Attempt to patch
 | 
					  description: Attempt to create a running Job which MUST succeed. Attempt to patch
 | 
				
			||||||
@@ -2750,6 +2758,15 @@
 | 
				
			|||||||
    pod.
 | 
					    pod.
 | 
				
			||||||
  release: v1.19
 | 
					  release: v1.19
 | 
				
			||||||
  file: test/e2e/scheduling/preemption.go
 | 
					  file: test/e2e/scheduling/preemption.go
 | 
				
			||||||
 | 
					- testname: Verify the DisruptionTarget condition is added to the preempted pod
 | 
				
			||||||
 | 
					  codename: '[sig-scheduling] SchedulerPreemption [Serial] validates pod disruption
 | 
				
			||||||
 | 
					    condition is added to the preempted pod [Conformance]'
 | 
				
			||||||
 | 
					  description: ' 1. Run a low priority pod with finalizer which consumes 1/1 of node
 | 
				
			||||||
 | 
					    resources 2. Schedule a higher priority pod which also consumes 1/1 of node resources
 | 
				
			||||||
 | 
					    3. See if the pod with lower priority is preempted and has the pod disruption
 | 
				
			||||||
 | 
					    condition 4. Remove the finalizer so that the pod can be deleted by GC'
 | 
				
			||||||
 | 
					  release: v1.31
 | 
				
			||||||
 | 
					  file: test/e2e/scheduling/preemption.go
 | 
				
			||||||
- testname: CSIDriver, lifecycle
 | 
					- testname: CSIDriver, lifecycle
 | 
				
			||||||
  codename: '[sig-storage] CSIInlineVolumes should run through the lifecycle of a
 | 
					  codename: '[sig-storage] CSIInlineVolumes should run through the lifecycle of a
 | 
				
			||||||
    CSIDriver [Conformance]'
 | 
					    CSIDriver [Conformance]'
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -96,7 +96,14 @@ var _ = SIGDescribe("Job", func() {
 | 
				
			|||||||
		gomega.Expect(successes).To(gomega.Equal(completions), "expected %d successful job pods, but got  %d", completions, successes)
 | 
							gomega.Expect(successes).To(gomega.Equal(completions), "expected %d successful job pods, but got  %d", completions, successes)
 | 
				
			||||||
	})
 | 
						})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	ginkgo.It("should allow to use the pod failure policy on exit code to fail the job early", func(ctx context.Context) {
 | 
						/*
 | 
				
			||||||
 | 
							Release: v1.31
 | 
				
			||||||
 | 
							Testname: Verify Pod Failure policy allows to fail job early on exit code.
 | 
				
			||||||
 | 
							Description: Create a job with pod failure policy, and exactly one
 | 
				
			||||||
 | 
							pod failing. The exit code of the failed pod matches the pod failure
 | 
				
			||||||
 | 
							policy triggering the Job failure.
 | 
				
			||||||
 | 
						*/
 | 
				
			||||||
 | 
						framework.ConformanceIt("should allow to use the pod failure policy on exit code to fail the job early", func(ctx context.Context) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		// We fail the Job's pod only once to ensure the backoffLimit is not
 | 
							// We fail the Job's pod only once to ensure the backoffLimit is not
 | 
				
			||||||
		// reached and thus the job is failed due to the pod failure policy
 | 
							// reached and thus the job is failed due to the pod failure policy
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -317,11 +317,16 @@ var _ = SIGDescribe("SchedulerPreemption", framework.WithSerial(), func() {
 | 
				
			|||||||
		}
 | 
							}
 | 
				
			||||||
	})
 | 
						})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// 1. Run a low priority pod with finalizer which consumes 1/1 of node resources
 | 
						/*
 | 
				
			||||||
	// 2. Schedule a higher priority pod which also consumes 1/1 of node resources
 | 
							Release: v1.31
 | 
				
			||||||
	// 3. See if the pod with lower priority is preempted and has the pod disruption condition
 | 
							Testname: Verify the DisruptionTarget condition is added to the preempted pod
 | 
				
			||||||
	// 4. Remove the finalizer so that the pod can be deleted by GC
 | 
							Description:
 | 
				
			||||||
	ginkgo.It("validates pod disruption condition is added to the preempted pod", func(ctx context.Context) {
 | 
							1. Run a low priority pod with finalizer which consumes 1/1 of node resources
 | 
				
			||||||
 | 
							2. Schedule a higher priority pod which also consumes 1/1 of node resources
 | 
				
			||||||
 | 
							3. See if the pod with lower priority is preempted and has the pod disruption condition
 | 
				
			||||||
 | 
							4. Remove the finalizer so that the pod can be deleted by GC
 | 
				
			||||||
 | 
						*/
 | 
				
			||||||
 | 
						framework.ConformanceIt("validates pod disruption condition is added to the preempted pod", func(ctx context.Context) {
 | 
				
			||||||
		podRes := v1.ResourceList{testExtendedResource: resource.MustParse("1")}
 | 
							podRes := v1.ResourceList{testExtendedResource: resource.MustParse("1")}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		ginkgo.By("Select a node to run the lower and higher priority pods")
 | 
							ginkgo.By("Select a node to run the lower and higher priority pods")
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user