diff options
| author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-08-20 20:46:05 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-20 20:46:05 +0200 |
| commit | dd18844bdb3a85a447b7505af465c2fa8a491efa (patch) | |
| tree | 9c940779070dbf778d1a034cc6020a1ed57e00f2 /test/e2e/run_networking_test.go | |
| parent | 7ccd821397d03ed545635de2a0b70a68ab4d46db (diff) | |
| parent | d10bc9f045ad7bc52d03bbf9462b3f94e693ccd1 (diff) | |
| download | podman-dd18844bdb3a85a447b7505af465c2fa8a491efa.tar.gz podman-dd18844bdb3a85a447b7505af465c2fa8a491efa.tar.bz2 podman-dd18844bdb3a85a447b7505af465c2fa8a491efa.zip | |
Merge pull request #7388 from Luap99/new-pod
fix pod creation with "new:" syntax followup + allow hostname
Diffstat (limited to 'test/e2e/run_networking_test.go')
| -rw-r--r-- | test/e2e/run_networking_test.go | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/test/e2e/run_networking_test.go b/test/e2e/run_networking_test.go index 83befe730..a48f7c83e 100644 --- a/test/e2e/run_networking_test.go +++ b/test/e2e/run_networking_test.go @@ -531,8 +531,8 @@ var _ = Describe("Podman run networking", func() { SkipIfRemote() SkipIfRootless() netName := "podmantestnetwork" - ipAddr := "10.20.30.128" - create := podmanTest.Podman([]string{"network", "create", "--subnet", "10.20.30.0/24", netName}) + ipAddr := "10.25.30.128" + create := podmanTest.Podman([]string{"network", "create", "--subnet", "10.25.30.0/24", netName}) create.WaitWithDefaultTimeout() Expect(create.ExitCode()).To(BeZero()) @@ -540,5 +540,33 @@ var _ = Describe("Podman run networking", func() { run.WaitWithDefaultTimeout() Expect(run.ExitCode()).To(BeZero()) Expect(run.OutputToString()).To(ContainSubstring(ipAddr)) + + netrm := podmanTest.Podman([]string{"network", "rm", netName}) + netrm.WaitWithDefaultTimeout() + Expect(netrm.ExitCode()).To(BeZero()) + }) + + It("podman run with new:pod and static-ip", func() { + SkipIfRemote() + SkipIfRootless() + netName := "podmantestnetwork2" + ipAddr := "10.25.40.128" + podname := "testpod" + create := podmanTest.Podman([]string{"network", "create", "--subnet", "10.25.40.0/24", netName}) + create.WaitWithDefaultTimeout() + Expect(create.ExitCode()).To(BeZero()) + + run := podmanTest.Podman([]string{"run", "-t", "-i", "--rm", "--pod", "new:" + podname, "--net", netName, "--ip", ipAddr, ALPINE, "ip", "addr"}) + run.WaitWithDefaultTimeout() + Expect(run.ExitCode()).To(BeZero()) + Expect(run.OutputToString()).To(ContainSubstring(ipAddr)) + + podrm := podmanTest.Podman([]string{"pod", "rm", "-f", podname}) + podrm.WaitWithDefaultTimeout() + Expect(podrm.ExitCode()).To(BeZero()) + + netrm := podmanTest.Podman([]string{"network", "rm", netName}) + netrm.WaitWithDefaultTimeout() + Expect(netrm.ExitCode()).To(BeZero()) }) }) |
