summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-11-26 19:56:49 +0100
committerGitHub <noreply@github.com>2019-11-26 19:56:49 +0100
commitb29928f01598810328fa6b0cf91abb84670d8d01 (patch)
tree74b87bc339c0ac18cb4293c6361b82f17207132c /test
parent07c63583dd6c539f70184c4693b10399f367e3e3 (diff)
parent01ae532a899997cb4c930003d4f2f5d5820ba7d7 (diff)
downloadpodman-b29928f01598810328fa6b0cf91abb84670d8d01.tar.gz
podman-b29928f01598810328fa6b0cf91abb84670d8d01.tar.bz2
podman-b29928f01598810328fa6b0cf91abb84670d8d01.zip
Merge pull request #4542 from mheon/static_ip_single_net_allowed
Allow --ip and --mac to be set when joining a CNI net
Diffstat (limited to 'test')
-rw-r--r--test/e2e/run_networking_test.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/e2e/run_networking_test.go b/test/e2e/run_networking_test.go
index ec12f709a..5e587b198 100644
--- a/test/e2e/run_networking_test.go
+++ b/test/e2e/run_networking_test.go
@@ -232,4 +232,18 @@ var _ = Describe("Podman run networking", func() {
Expect(session).To(ExitWithError())
Expect(session.ErrorToString()).To(ContainSubstring("stat /run/netns/xxy: no such file or directory"))
})
+
+ It("podman run in custom CNI network with --static-ip", func() {
+ SkipIfRootless()
+ netName := "podmantestnetwork"
+ ipAddr := "10.20.30.128"
+ create := podmanTest.Podman([]string{"network", "create", "--subnet", "10.20.30.0/24", netName})
+ create.WaitWithDefaultTimeout()
+ Expect(create.ExitCode()).To(BeZero())
+
+ run := podmanTest.Podman([]string{"run", "-t", "-i", "--rm", "--net", netName, "--ip", ipAddr, ALPINE, "ip", "addr"})
+ run.WaitWithDefaultTimeout()
+ Expect(run.ExitCode()).To(BeZero())
+ Expect(run.OutputToString()).To(ContainSubstring(ipAddr))
+ })
})