From efee9b4866d9154cc0f91c1d6f1f7b40f3502de8 Mon Sep 17 00:00:00 2001 From: Paco Xu Date: Mon, 27 Feb 2023 11:37:49 +0800 Subject: [PATCH] cleanup: promote ProbeTerminationGracePeriod to conformance tests --- test/conformance/testdata/conformance.yaml | 16 ++++++++++++++++ test/e2e/common/node/container_probe.go | 4 ++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/test/conformance/testdata/conformance.yaml b/test/conformance/testdata/conformance.yaml index 21ba6594352..8cee34843ba 100755 --- a/test/conformance/testdata/conformance.yaml +++ b/test/conformance/testdata/conformance.yaml @@ -2232,6 +2232,22 @@ every time health check fails, measure up to 5 restart. release: v1.9 file: test/e2e/common/node/container_probe.go +- testname: Set terminationGracePeriodSeconds for livenessProbe + codename: '[sig-node] Probing container should override timeoutGracePeriodSeconds + when LivenessProbe field is set [Conformance]' + description: A pod with a long terminationGracePeriod is created with a shorter + livenessProbe-level terminationGracePeriodSeconds. We confirm the shorter termination + period is used. + release: v1.21 + file: test/e2e/common/node/container_probe.go +- testname: Set terminationGracePeriodSeconds for startupProbe + codename: '[sig-node] Probing container should override timeoutGracePeriodSeconds + when StartupProbe field is set [Conformance]' + description: A pod with a long terminationGracePeriod is created with a shorter + startupProbe-level terminationGracePeriodSeconds. We confirm the shorter termination + period is used. + release: v1.21 + file: test/e2e/common/node/container_probe.go - testname: Pod readiness probe, with initial delay codename: '[sig-node] Probing container with readiness probe should not be ready before initial delay and never restart [NodeConformance] [Conformance]' diff --git a/test/e2e/common/node/container_probe.go b/test/e2e/common/node/container_probe.go index 888bbb9e7c1..36e1c2e4078 100644 --- a/test/e2e/common/node/container_probe.go +++ b/test/e2e/common/node/container_probe.go @@ -459,7 +459,7 @@ var _ = SIGDescribe("Probing container", func() { Testname: Set terminationGracePeriodSeconds for livenessProbe Description: A pod with a long terminationGracePeriod is created with a shorter livenessProbe-level terminationGracePeriodSeconds. We confirm the shorter termination period is used. */ - ginkgo.It("should override timeoutGracePeriodSeconds when LivenessProbe field is set [Feature:ProbeTerminationGracePeriod]", func(ctx context.Context) { + framework.ConformanceIt("should override timeoutGracePeriodSeconds when LivenessProbe field is set", func(ctx context.Context) { pod := e2epod.NewAgnhostPod(f.Namespace.Name, "liveness-override-"+string(uuid.NewUUID()), nil, nil, nil, "/bin/sh", "-c", "sleep 1000") longGracePeriod := int64(500) pod.Spec.TerminationGracePeriodSeconds = &longGracePeriod @@ -487,7 +487,7 @@ var _ = SIGDescribe("Probing container", func() { Testname: Set terminationGracePeriodSeconds for startupProbe Description: A pod with a long terminationGracePeriod is created with a shorter startupProbe-level terminationGracePeriodSeconds. We confirm the shorter termination period is used. */ - ginkgo.It("should override timeoutGracePeriodSeconds when StartupProbe field is set [Feature:ProbeTerminationGracePeriod]", func(ctx context.Context) { + framework.ConformanceIt("should override timeoutGracePeriodSeconds when StartupProbe field is set", func(ctx context.Context) { pod := e2epod.NewAgnhostPod(f.Namespace.Name, "startup-override-"+string(uuid.NewUUID()), nil, nil, nil, "/bin/sh", "-c", "sleep 1000") longGracePeriod := int64(500) pod.Spec.TerminationGracePeriodSeconds = &longGracePeriod