summaryrefslogtreecommitdiff
path: root/test/e2e/pod_create_test.go
diff options
context:
space:
mode:
authorBrent Baude <bbaude@redhat.com>2022-01-05 13:10:56 -0600
committerBrent Baude <bbaude@redhat.com>2022-02-02 13:03:45 -0600
commit7d3ad6081f6598b8fa6385409e5109f11f29254f (patch)
treee68f74bfc0393443ee322380fee4940ca043aba3 /test/e2e/pod_create_test.go
parentc2d0011b723428c622b99cf633439f84c4bf901a (diff)
downloadpodman-7d3ad6081f6598b8fa6385409e5109f11f29254f.tar.gz
podman-7d3ad6081f6598b8fa6385409e5109f11f29254f.tar.bz2
podman-7d3ad6081f6598b8fa6385409e5109f11f29254f.zip
netavark e2e tests
enabled e2e tests for netavark Signed-off-by: Brent Baude <bbaude@redhat.com>
Diffstat (limited to 'test/e2e/pod_create_test.go')
-rw-r--r--test/e2e/pod_create_test.go14
1 files changed, 6 insertions, 8 deletions
diff --git a/test/e2e/pod_create_test.go b/test/e2e/pod_create_test.go
index f0abfd80c..c3f77857e 100644
--- a/test/e2e/pod_create_test.go
+++ b/test/e2e/pod_create_test.go
@@ -109,7 +109,8 @@ var _ = Describe("Podman pod create", func() {
It("podman create pod with network portbindings", func() {
name := "test"
- session := podmanTest.Podman([]string{"pod", "create", "--name", name, "-p", "8081:80"})
+ port := GetPort()
+ session := podmanTest.Podman([]string{"pod", "create", "--name", name, "-p", fmt.Sprintf("%d:80", port)})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
pod := session.OutputToString()
@@ -117,24 +118,21 @@ var _ = Describe("Podman pod create", func() {
webserver := podmanTest.Podman([]string{"run", "--pod", pod, "-dt", nginx})
webserver.WaitWithDefaultTimeout()
Expect(webserver).Should(Exit(0))
-
- check := SystemExec("nc", []string{"-z", "localhost", "8081"})
- Expect(check).Should(Exit(0))
+ Expect(ncz(port)).To(BeTrue())
})
It("podman create pod with id file with network portbindings", func() {
file := filepath.Join(podmanTest.TempDir, "pod.id")
name := "test"
- session := podmanTest.Podman([]string{"pod", "create", "--name", name, "--pod-id-file", file, "-p", "8082:80"})
+ port := GetPort()
+ session := podmanTest.Podman([]string{"pod", "create", "--name", name, "--pod-id-file", file, "-p", fmt.Sprintf("%d:80", port)})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
webserver := podmanTest.Podman([]string{"run", "--pod-id-file", file, "-dt", nginx})
webserver.WaitWithDefaultTimeout()
Expect(webserver).Should(Exit(0))
-
- check := SystemExec("nc", []string{"-z", "localhost", "8082"})
- Expect(check).Should(Exit(0))
+ Expect(ncz(port)).To(BeTrue())
})
It("podman create pod with no infra but portbindings should fail", func() {