summaryrefslogtreecommitdiff
path: root/test/e2e/network_connect_disconnect_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'test/e2e/network_connect_disconnect_test.go')
-rw-r--r--test/e2e/network_connect_disconnect_test.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/test/e2e/network_connect_disconnect_test.go b/test/e2e/network_connect_disconnect_test.go
index 2205a1263..be94ecb2d 100644
--- a/test/e2e/network_connect_disconnect_test.go
+++ b/test/e2e/network_connect_disconnect_test.go
@@ -176,12 +176,14 @@ var _ = Describe("Podman network connect and disconnect", func() {
// Create a second network
newNetName := "aliasTest" + stringid.GenerateNonCryptoID()
- session = podmanTest.Podman([]string{"network", "create", newNetName})
+ session = podmanTest.Podman([]string{"network", "create", newNetName, "--subnet", "10.11.100.0/24"})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
defer podmanTest.removeCNINetwork(newNetName)
- connect := podmanTest.Podman([]string{"network", "connect", newNetName, "test"})
+ ip := "10.11.100.99"
+ mac := "44:11:44:11:44:11"
+ connect := podmanTest.Podman([]string{"network", "connect", "--ip", ip, "--mac-address", mac, newNetName, "test"})
connect.WaitWithDefaultTimeout()
Expect(connect).Should(Exit(0))
Expect(connect.ErrorToString()).Should(Equal(""))
@@ -200,6 +202,8 @@ var _ = Describe("Podman network connect and disconnect", func() {
exec = podmanTest.Podman([]string{"exec", "-it", "test", "ip", "addr", "show", "eth1"})
exec.WaitWithDefaultTimeout()
Expect(exec).Should(Exit(0))
+ Expect(exec.OutputToString()).Should(ContainSubstring(ip))
+ Expect(exec.OutputToString()).Should(ContainSubstring(mac))
// make sure no logrus errors are shown https://github.com/containers/podman/issues/9602
rm := podmanTest.Podman([]string{"rm", "--time=0", "-f", "test"})