diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-10-20 17:07:11 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-20 17:07:11 -0400 |
commit | 94873a237ab52db27916b8954e489fe780eea069 (patch) | |
tree | 216d88f10e261644c8f287d20495adeaaaad1eae /test/e2e | |
parent | 4822cc8cabce33732cb210103aaa208f81102c5d (diff) | |
parent | c1b844ecc8620f446e95253e9a5124a628576e57 (diff) | |
download | podman-94873a237ab52db27916b8954e489fe780eea069.tar.gz podman-94873a237ab52db27916b8954e489fe780eea069.tar.bz2 podman-94873a237ab52db27916b8954e489fe780eea069.zip |
Merge pull request #8075 from mheon/fix_8073
Retrieve network inspect info from dependency container
Diffstat (limited to 'test/e2e')
-rw-r--r-- | test/e2e/pod_create_test.go | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/e2e/pod_create_test.go b/test/e2e/pod_create_test.go index f69b6ca7b..83a66d2b9 100644 --- a/test/e2e/pod_create_test.go +++ b/test/e2e/pod_create_test.go @@ -245,6 +245,24 @@ var _ = Describe("Podman pod create", func() { } }) + It("podman container in pod with IP address shares IP address", func() { + SkipIfRootless("Rootless does not support --ip") + podName := "test" + ctrName := "testCtr" + ip := GetRandomIPAddress() + podCreate := podmanTest.Podman([]string{"pod", "create", "--ip", ip, "--name", podName}) + podCreate.WaitWithDefaultTimeout() + Expect(podCreate.ExitCode()).To(Equal(0)) + podCtr := podmanTest.Podman([]string{"run", "--name", ctrName, "--pod", podName, "-d", "-t", ALPINE, "top"}) + podCtr.WaitWithDefaultTimeout() + Expect(podCtr.ExitCode()).To(Equal(0)) + ctrInspect := podmanTest.Podman([]string{"inspect", ctrName}) + ctrInspect.WaitWithDefaultTimeout() + Expect(ctrInspect.ExitCode()).To(Equal(0)) + ctrJSON := ctrInspect.InspectContainerToJSON() + Expect(ctrJSON[0].NetworkSettings.IPAddress).To(Equal(ip)) + }) + It("podman create pod with IP address and no infra should fail", func() { name := "test" ip := GetRandomIPAddress() |