diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-08-21 18:52:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-21 18:52:55 +0200 |
commit | 4828455055010a1376f1e83832bfa34787f3a1e7 (patch) | |
tree | 5e74cd1f2800552042901173923d3f35386882ca /test | |
parent | a8619bbb832646a816a138e0656ca6abdc9ad04e (diff) | |
parent | 7b21bcef5881db4f341090d255f6ef204a30dd1e (diff) | |
download | podman-4828455055010a1376f1e83832bfa34787f3a1e7.tar.gz podman-4828455055010a1376f1e83832bfa34787f3a1e7.tar.bz2 podman-4828455055010a1376f1e83832bfa34787f3a1e7.zip |
Merge pull request #7390 from baude/podnet
error when adding container to pod with network information
Diffstat (limited to 'test')
-rw-r--r-- | test/e2e/create_test.go | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/test/e2e/create_test.go b/test/e2e/create_test.go index 72a3a7717..9cfed263a 100644 --- a/test/e2e/create_test.go +++ b/test/e2e/create_test.go @@ -542,4 +542,66 @@ var _ = Describe("Podman create", func() { Expect(session.ExitCode()).To(Not(Equal(0))) Expect(session.ErrorToString()).To(ContainSubstring("Invalid umask")) }) + + 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()) + }) + }) |