From 1a2e1eb46e1583713a4068ea6ba42e48c9f6060d Mon Sep 17 00:00:00 2001 From: Ed Santiago Date: Wed, 7 Aug 2024 05:34:12 -0600 Subject: [PATCH] CI: e2e: serialize root containerPort tests Two tests, both check port 80 on host, one wants it live, the other wants it blocked. Prevent them from running concurrently. Fixes: #23470 Signed-off-by: Ed Santiago --- test/e2e/play_kube_test.go | 41 ++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/test/e2e/play_kube_test.go b/test/e2e/play_kube_test.go index cc051137d1..c903f73978 100644 --- a/test/e2e/play_kube_test.go +++ b/test/e2e/play_kube_test.go @@ -5761,15 +5761,30 @@ spec: Expect(kube).Should(ExitWithError(125, "rootlessport cannot expose privileged port 80")) }) - It("podman play kube should not publish containerPort by default", func() { - err := writeYaml(publishPortsPodWithContainerPort, kubeYaml) - Expect(err).ToNot(HaveOccurred()) + // Prevent these two tests from running in parallel + Describe("with containerPort", Serial, func() { + It("should not publish containerPort by default", func() { + err := writeYaml(publishPortsPodWithContainerPort, kubeYaml) + Expect(err).ToNot(HaveOccurred()) - kube := podmanTest.Podman([]string{"kube", "play", kubeYaml}) - kube.WaitWithDefaultTimeout() - Expect(kube).Should(Exit(0)) + kube := podmanTest.Podman([]string{"kube", "play", kubeYaml}) + kube.WaitWithDefaultTimeout() + Expect(kube).Should(Exit(0)) - testHTTPServer("80", true, "connection refused") + testHTTPServer("80", true, "connection refused") + }) + + It("should publish containerPort with --publish-all", func() { + SkipIfRootless("rootlessport can't expose privileged port 80") + err := writeYaml(publishPortsPodWithContainerPort, kubeYaml) + Expect(err).ToNot(HaveOccurred()) + + kube := podmanTest.Podman([]string{"kube", "play", "--publish-all=true", kubeYaml}) + kube.WaitWithDefaultTimeout() + Expect(kube).Should(Exit(0)) + + testHTTPServer("80", false, "podman rulez") + }) }) It("with privileged containers ports and publish in command line - curl should succeed", func() { @@ -5783,18 +5798,6 @@ spec: testHTTPServer("19003", false, "podman rulez") }) - It("podman play kube should publish containerPort with --publish-all", func() { - SkipIfRootless("rootlessport can't expose privileged port 80") - err := writeYaml(publishPortsPodWithContainerPort, kubeYaml) - Expect(err).ToNot(HaveOccurred()) - - kube := podmanTest.Podman([]string{"kube", "play", "--publish-all=true", kubeYaml}) - kube.WaitWithDefaultTimeout() - Expect(kube).Should(Exit(0)) - - testHTTPServer("80", false, "podman rulez") - }) - It("with Host Ports - curl should succeed", func() { err := writeYaml(publishPortsPodWithContainerHostPort, kubeYaml) Expect(err).ToNot(HaveOccurred())