summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPaul Holzinger <paul.holzinger@web.de>2020-07-29 21:58:46 +0200
committerValentin Rothberg <rothberg@redhat.com>2020-08-11 13:53:23 +0200
commit895e0d0e2ea74cbba4a4a351e865c55f313bdf99 (patch)
tree3ae3e2bd0034d0fb7e33374fd1ba8ce9747732b4 /test
parent3262f77406c597652e5cdbf6585a0c4f3bb30436 (diff)
downloadpodman-895e0d0e2ea74cbba4a4a351e865c55f313bdf99.tar.gz
podman-895e0d0e2ea74cbba4a4a351e865c55f313bdf99.tar.bz2
podman-895e0d0e2ea74cbba4a4a351e865c55f313bdf99.zip
fix pod creation with "new:" syntax
When you execute podman create/run with the --pod new:<name> syntax the pod was created but the namespaces where not shared and therefore containers could not communicate over localhost. Add the default namespaces and pass the network options to the pod create options. Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
Diffstat (limited to 'test')
-rw-r--r--test/e2e/run_test.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/e2e/run_test.go b/test/e2e/run_test.go
index d2950ed43..95eecd042 100644
--- a/test/e2e/run_test.go
+++ b/test/e2e/run_test.go
@@ -797,7 +797,11 @@ USER mail`
})
It("podman run --pod automatically", func() {
- session := podmanTest.Podman([]string{"run", "--pod", "new:foobar", ALPINE, "ls"})
+ session := podmanTest.Podman([]string{"run", "-d", "--pod", "new:foobar", ALPINE, "nc", "-l", "-p", "8080"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+
+ session = podmanTest.Podman([]string{"run", "--pod", "foobar", ALPINE, "/bin/sh", "-c", "echo test | nc -w 1 127.0.0.1 8080"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))