summaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-02-02 14:57:37 -0500
committerGitHub <noreply@github.com>2021-02-02 14:57:37 -0500
commitaab8a934f5bd9bc58959c49f334d3ba57a0f5135 (patch)
tree0870e9b21e64d4347ea8024ccc8dba0ff3a263e0 /test/e2e
parent628b0d79b523953cc6aa9b48bd91d04d0843353b (diff)
parent931ea939ac85bc0e64d12dc34ac920e9e91c4277 (diff)
downloadpodman-aab8a934f5bd9bc58959c49f334d3ba57a0f5135.tar.gz
podman-aab8a934f5bd9bc58959c49f334d3ba57a0f5135.tar.bz2
podman-aab8a934f5bd9bc58959c49f334d3ba57a0f5135.zip
Merge pull request #9185 from mheon/pod_no_network
Allow pods to use --net=none
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/pod_create_test.go20
1 files changed, 14 insertions, 6 deletions
diff --git a/test/e2e/pod_create_test.go b/test/e2e/pod_create_test.go
index 575f9df68..9818c4f65 100644
--- a/test/e2e/pod_create_test.go
+++ b/test/e2e/pod_create_test.go
@@ -478,12 +478,7 @@ entrypoint ["/fromimage"]
})
It("podman create with unsupported network options", func() {
- podCreate := podmanTest.Podman([]string{"pod", "create", "--network", "none"})
- podCreate.WaitWithDefaultTimeout()
- Expect(podCreate.ExitCode()).To(Equal(125))
- Expect(podCreate.ErrorToString()).To(ContainSubstring("pods presently do not support network mode none"))
-
- podCreate = podmanTest.Podman([]string{"pod", "create", "--network", "container:doesnotmatter"})
+ podCreate := podmanTest.Podman([]string{"pod", "create", "--network", "container:doesnotmatter"})
podCreate.WaitWithDefaultTimeout()
Expect(podCreate.ExitCode()).To(Equal(125))
Expect(podCreate.ErrorToString()).To(ContainSubstring("pods presently do not support network mode container"))
@@ -493,4 +488,17 @@ entrypoint ["/fromimage"]
Expect(podCreate.ExitCode()).To(Equal(125))
Expect(podCreate.ErrorToString()).To(ContainSubstring("pods presently do not support network mode path"))
})
+
+ It("podman pod create with --net=none", func() {
+ podName := "testPod"
+ podCreate := podmanTest.Podman([]string{"pod", "create", "--network", "none", "--name", podName})
+ podCreate.WaitWithDefaultTimeout()
+ Expect(podCreate.ExitCode()).To(Equal(0))
+
+ session := podmanTest.Podman([]string{"run", "--pod", podName, ALPINE, "ip", "-o", "-4", "addr"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(session.OutputToString()).To(ContainSubstring("inet 127.0.0.1/8 scope host lo"))
+ Expect(len(session.OutputToStringArray())).To(Equal(1))
+ })
})