summaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-08-23 09:40:09 -0400
committerGitHub <noreply@github.com>2021-08-23 09:40:09 -0400
commitd36510702be1d60b8984ebcf3ad20a70f398c568 (patch)
tree013deaf08fbdfe3c64ebc5678790cb577f43d4f6 /test/e2e
parent34a6dfb30ea1861be2f261e88df2979562ad6b60 (diff)
parentfeff0d3c4bf67b16f2b31346a77f6dffc2416d4a (diff)
downloadpodman-d36510702be1d60b8984ebcf3ad20a70f398c568.tar.gz
podman-d36510702be1d60b8984ebcf3ad20a70f398c568.tar.bz2
podman-d36510702be1d60b8984ebcf3ad20a70f398c568.zip
Merge pull request #11305 from Luap99/fix-11303
Use pod netns with --pod-id-file
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/pod_create_test.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/e2e/pod_create_test.go b/test/e2e/pod_create_test.go
index f6f532ce9..c961bfc32 100644
--- a/test/e2e/pod_create_test.go
+++ b/test/e2e/pod_create_test.go
@@ -121,6 +121,21 @@ var _ = Describe("Podman pod create", func() {
Expect(check).Should(Exit(0))
})
+ 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", "8080:80"})
+ 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", "8080"})
+ Expect(check).Should(Exit(0))
+ })
+
It("podman create pod with no infra but portbindings should fail", func() {
name := "test"
session := podmanTest.Podman([]string{"pod", "create", "--infra=false", "--name", name, "-p", "80:80"})