aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-08-24 18:35:59 -0400
committerGitHub <noreply@github.com>2020-08-24 18:35:59 -0400
commit024f47068a894907ee47b1b90c86090a00586940 (patch)
tree4528b3566c3162ca2892b8c3d752d3957161e3d5 /test
parentc78c6b44ce63430218e141415a10b2010d42f883 (diff)
parent13d5b2d661478005a0b7eec5563d13580b6cd3f8 (diff)
downloadpodman-024f47068a894907ee47b1b90c86090a00586940.tar.gz
podman-024f47068a894907ee47b1b90c86090a00586940.tar.bz2
podman-024f47068a894907ee47b1b90c86090a00586940.zip
Merge pull request #7402 from mheon/last_pr_before_205_really_this_time
Final v2.0.5 backports
Diffstat (limited to 'test')
-rw-r--r--test/e2e/create_test.go61
1 files changed, 61 insertions, 0 deletions
diff --git a/test/e2e/create_test.go b/test/e2e/create_test.go
index 5f96f96b1..9fce1aa67 100644
--- a/test/e2e/create_test.go
+++ b/test/e2e/create_test.go
@@ -471,4 +471,65 @@ var _ = Describe("Podman create", func() {
Expect(len(data)).To(Equal(1))
Expect(data[0].Config.StopSignal).To(Equal(uint(15)))
})
+
+ It("create container in pod with IP should fail", func() {
+ SkipIfRootless()
+ name := "createwithstaticip"
+ pod := podmanTest.RunTopContainerInPod("", "new:"+name)
+ pod.WaitWithDefaultTimeout()
+ Expect(pod.ExitCode()).To(BeZero())
+
+ session := podmanTest.Podman([]string{"create", "--pod", name, "--ip", "192.168.1.2", ALPINE, "top"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).ToNot(BeZero())
+ })
+
+ It("create container in pod with mac should fail", func() {
+ SkipIfRootless()
+ name := "createwithstaticmac"
+ pod := podmanTest.RunTopContainerInPod("", "new:"+name)
+ pod.WaitWithDefaultTimeout()
+ Expect(pod.ExitCode()).To(BeZero())
+
+ session := podmanTest.Podman([]string{"create", "--pod", name, "--mac-address", "52:54:00:6d:2f:82", ALPINE, "top"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).ToNot(BeZero())
+ })
+
+ It("create container in pod with network should fail", func() {
+ SkipIfRootless()
+ name := "createwithnetwork"
+ pod := podmanTest.RunTopContainerInPod("", "new:"+name)
+ pod.WaitWithDefaultTimeout()
+ Expect(pod.ExitCode()).To(BeZero())
+
+ session := podmanTest.Podman([]string{"create", "--pod", name, "--network", "foobar", ALPINE, "top"})
+ session.WaitWithDefaultTimeout()
+ //Expect(session.ExitCode()).ToNot(BeZero())
+ Expect(session.ExitCode()).To(BeZero())
+ })
+
+ It("create container in pod with ports should fail", func() {
+ SkipIfRootless()
+ name := "createwithports"
+ pod := podmanTest.RunTopContainerInPod("", "new:"+name)
+ pod.WaitWithDefaultTimeout()
+ Expect(pod.ExitCode()).To(BeZero())
+
+ session := podmanTest.Podman([]string{"create", "--pod", name, "-p", "80:80", ALPINE, "top"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).ToNot(BeZero())
+ })
+
+ It("create container in pod ppublish ports should fail", func() {
+ SkipIfRootless()
+ name := "createwithpublishports"
+ pod := podmanTest.RunTopContainerInPod("", "new:"+name)
+ pod.WaitWithDefaultTimeout()
+ Expect(pod.ExitCode()).To(BeZero())
+
+ session := podmanTest.Podman([]string{"create", "--pod", name, "-P", ALPINE, "top"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).ToNot(BeZero())
+ })
})