diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-02-03 05:00:24 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-03 05:00:24 -0500 |
commit | 97421651d3821a03eab319befdedcf554c31a2f9 (patch) | |
tree | 1ed7aba24817c7ad8d57b5d90b272857ab46a610 /test/e2e | |
parent | 881f3d788d48b683e674d1f9778d581370c9c11e (diff) | |
parent | bd0e22ed14ca09a7b656f4603c13aac3a4066968 (diff) | |
download | podman-97421651d3821a03eab319befdedcf554c31a2f9.tar.gz podman-97421651d3821a03eab319befdedcf554c31a2f9.tar.bz2 podman-97421651d3821a03eab319befdedcf554c31a2f9.zip |
Merge pull request #9204 from baude/macvlanextra
Honor network options for macvlan networks
Diffstat (limited to 'test/e2e')
-rw-r--r-- | test/e2e/network_test.go | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/test/e2e/network_test.go b/test/e2e/network_test.go index 124ee7e29..c6010ba43 100644 --- a/test/e2e/network_test.go +++ b/test/e2e/network_test.go @@ -487,7 +487,6 @@ var _ = Describe("Podman network", func() { inspect := podmanTest.Podman([]string{"network", "inspect", net}) inspect.WaitWithDefaultTimeout() Expect(inspect.ExitCode()).To(BeZero()) - fmt.Println(inspect.OutputToString()) out, err := inspect.jq(".[0].plugins[0].master") Expect(err).To(BeNil()) @@ -513,4 +512,32 @@ var _ = Describe("Podman network", func() { session.WaitWithDefaultTimeout() Expect(session.ExitCode()).To(Equal(1)) }) + + It("podman network create macvlan with network info and options", func() { + net := "macvlan" + stringid.GenerateNonCryptoID() + nc := podmanTest.Podman([]string{"network", "create", "-d", "macvlan", "-o", "parent=lo", "-o", "mtu=1500", "--gateway", "192.168.1.254", "--subnet", "192.168.1.0/24", net}) + nc.WaitWithDefaultTimeout() + defer podmanTest.removeCNINetwork(net) + Expect(nc.ExitCode()).To(Equal(0)) + + inspect := podmanTest.Podman([]string{"network", "inspect", net}) + inspect.WaitWithDefaultTimeout() + Expect(inspect.ExitCode()).To(BeZero()) + + mtu, err := inspect.jq(".[0].plugins[0].mtu") + Expect(err).To(BeNil()) + Expect(mtu).To(Equal("1500")) + + gw, err := inspect.jq(".[0].plugins[0].ipam.ranges[0][0].gateway") + Expect(err).To(BeNil()) + Expect(gw).To(Equal("\"192.168.1.254\"")) + + subnet, err := inspect.jq(".[0].plugins[0].ipam.ranges[0][0].subnet") + Expect(err).To(BeNil()) + Expect(subnet).To(Equal("\"192.168.1.0/24\"")) + + nc = podmanTest.Podman([]string{"network", "rm", net}) + nc.WaitWithDefaultTimeout() + Expect(nc.ExitCode()).To(Equal(0)) + }) }) |