summaryrefslogtreecommitdiff
path: root/test/e2e/generate_kube_test.go
diff options
context:
space:
mode:
authorEd Santiago <santiago@redhat.com>2022-08-29 12:23:08 -0600
committerEd Santiago <santiago@redhat.com>2022-08-29 14:11:46 -0600
commita240146a2d73c78c6fb2382a9d4be91e026802db (patch)
tree2233b7bcdff024bddf13c6f8654553cea9411d14 /test/e2e/generate_kube_test.go
parent468aa6478c73e4acd8708ce8bb0bb5a056f329c2 (diff)
downloadpodman-a240146a2d73c78c6fb2382a9d4be91e026802db.tar.gz
podman-a240146a2d73c78c6fb2382a9d4be91e026802db.tar.bz2
podman-a240146a2d73c78c6fb2382a9d4be91e026802db.zip
e2e tests: try to deflake 5000
We keep getting flakes in tests that use port 5000. Try to find and fix, by switching ports where possible, and locking 5000 when not possible (or not easy) to switch. Signed-off-by: Ed Santiago <santiago@redhat.com>
Diffstat (limited to 'test/e2e/generate_kube_test.go')
-rw-r--r--test/e2e/generate_kube_test.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/e2e/generate_kube_test.go b/test/e2e/generate_kube_test.go
index e7ceaf2d2..5133059b8 100644
--- a/test/e2e/generate_kube_test.go
+++ b/test/e2e/generate_kube_test.go
@@ -550,6 +550,11 @@ var _ = Describe("Podman generate kube", func() {
It("podman generate kube on pod with ports", func() {
podName := "test"
+
+ lock4 := GetPortLock("4000")
+ defer lock4.Unlock()
+ lock5 := GetPortLock("5000")
+ defer lock5.Unlock()
podSession := podmanTest.Podman([]string{"pod", "create", "--name", podName, "-p", "4000:4000", "-p", "5000:5000"})
podSession.WaitWithDefaultTimeout()
Expect(podSession).Should(Exit(0))