Merge pull request #102866 from SergeyKanzhelev/skipMoreTestsUnlessExecProbeTimeoutSet

skipping more tests in case when ExecProbeTimeout set to false
This commit is contained in:
Kubernetes Prow Robot 2021-06-16 08:37:59 -07:00 committed by GitHub
commit a4c1698f86
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -235,6 +235,10 @@ var _ = SIGDescribe("Probing container", func() {
Description: A Pod is created with readiness probe with a Exec action on the Pod. If the readiness probe call does not return within the timeout specified, readiness probe MUST not be Ready. Description: A Pod is created with readiness probe with a Exec action on the Pod. If the readiness probe call does not return within the timeout specified, readiness probe MUST not be Ready.
*/ */
ginkgo.It("should not be ready with an exec readiness probe timeout [MinimumKubeletVersion:1.20] [NodeConformance]", func() { ginkgo.It("should not be ready with an exec readiness probe timeout [MinimumKubeletVersion:1.20] [NodeConformance]", func() {
// The ExecProbeTimeout feature gate exists to allow backwards-compatibility with pre-1.20 cluster behaviors, where readiness probe timeouts were ignored
// If ExecProbeTimeout feature gate is disabled, timeout enforcement for exec readiness probe is disabled, so we should skip this test
e2eskipper.SkipUnlessExecProbeTimeoutEnabled()
cmd := []string{"/bin/sh", "-c", "sleep 600"} cmd := []string{"/bin/sh", "-c", "sleep 600"}
readinessProbe := &v1.Probe{ readinessProbe := &v1.Probe{
Handler: execHandler([]string{"/bin/sh", "-c", "sleep 10"}), Handler: execHandler([]string{"/bin/sh", "-c", "sleep 10"}),
@ -255,6 +259,8 @@ var _ = SIGDescribe("Probing container", func() {
// The ExecProbeTimeout feature gate exists to allow backwards-compatibility with pre-1.20 cluster behaviors using dockershim, where livenessProbe timeouts were ignored // The ExecProbeTimeout feature gate exists to allow backwards-compatibility with pre-1.20 cluster behaviors using dockershim, where livenessProbe timeouts were ignored
// If ExecProbeTimeout feature gate is disabled on a dockershim cluster, timeout enforcement for exec livenessProbes is disabled, but a failing liveness probe MUST still trigger a restart // If ExecProbeTimeout feature gate is disabled on a dockershim cluster, timeout enforcement for exec livenessProbes is disabled, but a failing liveness probe MUST still trigger a restart
// Note ExecProbeTimeout=false is not recommended for non-dockershim clusters (e.g., containerd), and this test will fail if run against such a configuration // Note ExecProbeTimeout=false is not recommended for non-dockershim clusters (e.g., containerd), and this test will fail if run against such a configuration
e2eskipper.SkipUnlessExecProbeTimeoutEnabled()
cmd := []string{"/bin/sh", "-c", "sleep 600"} cmd := []string{"/bin/sh", "-c", "sleep 600"}
livenessProbe := &v1.Probe{ livenessProbe := &v1.Probe{
Handler: execHandler([]string{"/bin/sh", "-c", "sleep 10 & exit 1"}), Handler: execHandler([]string{"/bin/sh", "-c", "sleep 10 & exit 1"}),