summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-02-01 08:48:54 -0500
committerGitHub <noreply@github.com>2021-02-01 08:48:54 -0500
commit20183349fd2c6a9a569c6c79234af48bb5d92ff7 (patch)
tree29beae2f47e790513f0a3e9ebc1501c45ec7cb06 /test
parent81a3ba36ae8d22b767e620c0b4c804764340de52 (diff)
parent3cfd4ce45e4967d395172527e4b4f589ec8d6fd6 (diff)
downloadpodman-20183349fd2c6a9a569c6c79234af48bb5d92ff7.tar.gz
podman-20183349fd2c6a9a569c6c79234af48bb5d92ff7.tar.bz2
podman-20183349fd2c6a9a569c6c79234af48bb5d92ff7.zip
Merge pull request #9168 from Luap99/fix-pod-create-network-parsing
Fix --network parsing for podman pod create
Diffstat (limited to 'test')
-rw-r--r--test/e2e/pod_create_test.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/e2e/pod_create_test.go b/test/e2e/pod_create_test.go
index 9c448a81e..575f9df68 100644
--- a/test/e2e/pod_create_test.go
+++ b/test/e2e/pod_create_test.go
@@ -476,4 +476,21 @@ entrypoint ["/fromimage"]
Expect(status3.ExitCode()).To(Equal(0))
Expect(strings.Contains(status3.OutputToString(), "Degraded")).To(BeTrue())
})
+
+ 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.WaitWithDefaultTimeout()
+ Expect(podCreate.ExitCode()).To(Equal(125))
+ Expect(podCreate.ErrorToString()).To(ContainSubstring("pods presently do not support network mode container"))
+
+ podCreate = podmanTest.Podman([]string{"pod", "create", "--network", "ns:/does/not/matter"})
+ podCreate.WaitWithDefaultTimeout()
+ Expect(podCreate.ExitCode()).To(Equal(125))
+ Expect(podCreate.ErrorToString()).To(ContainSubstring("pods presently do not support network mode path"))
+ })
})