diff options
author | Brent Baude <bbaude@redhat.com> | 2022-01-05 13:10:56 -0600 |
---|---|---|
committer | Chris Evich <cevich@redhat.com> | 2022-02-11 11:23:24 -0500 |
commit | 9688a462e996ac5d2bebf24f7ffdfaca9dc0ff05 (patch) | |
tree | f28d85664f867115153168dd3ebcc8931106e977 /test/e2e/pod_create_test.go | |
parent | c4a9aa7c73e120fc2e246f056fec83ff35854dba (diff) | |
download | podman-9688a462e996ac5d2bebf24f7ffdfaca9dc0ff05.tar.gz podman-9688a462e996ac5d2bebf24f7ffdfaca9dc0ff05.tar.bz2 podman-9688a462e996ac5d2bebf24f7ffdfaca9dc0ff05.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.go | 14 |
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() { |