summaryrefslogtreecommitdiff
path: root/test/e2e/run_staticip_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'test/e2e/run_staticip_test.go')
-rw-r--r--test/e2e/run_staticip_test.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/e2e/run_staticip_test.go b/test/e2e/run_staticip_test.go
index 6dd7a14d0..eb7dc9d11 100644
--- a/test/e2e/run_staticip_test.go
+++ b/test/e2e/run_staticip_test.go
@@ -65,6 +65,26 @@ var _ = Describe("Podman run with --ip flag", func() {
Expect(result.OutputToString()).To(ContainSubstring(ip + "/16"))
})
+ It("Podman run with --network bridge:ip=", func() {
+ ip := GetRandomIPAddress()
+ result := podmanTest.Podman([]string{"run", "-ti", "--network", "bridge:ip=" + ip, ALPINE, "ip", "addr"})
+ result.WaitWithDefaultTimeout()
+ Expect(result).Should(Exit(0))
+ Expect(result.OutputToString()).To(ContainSubstring(ip + "/16"))
+ })
+
+ It("Podman run with --network net:ip=,mac=,interface_name=", func() {
+ ip := GetRandomIPAddress()
+ mac := "44:33:22:11:00:99"
+ intName := "myeth"
+ result := podmanTest.Podman([]string{"run", "-ti", "--network", "bridge:ip=" + ip + ",mac=" + mac + ",interface_name=" + intName, ALPINE, "ip", "addr"})
+ result.WaitWithDefaultTimeout()
+ Expect(result).Should(Exit(0))
+ Expect(result.OutputToString()).To(ContainSubstring(ip + "/16"))
+ Expect(result.OutputToString()).To(ContainSubstring(mac))
+ Expect(result.OutputToString()).To(ContainSubstring(intName))
+ })
+
It("Podman run two containers with the same IP", func() {
ip := GetRandomIPAddress()
result := podmanTest.Podman([]string{"run", "-dt", "--ip", ip, nginx})