summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-05-25 12:42:07 -0700
committerGitHub <noreply@github.com>2021-05-25 12:42:07 -0700
commitf6f6edc4800a6cf186f526d132b6008c01f1a061 (patch)
treef2336ca6837502ddc875ad64d647b0a7a139074b /test
parent8f71881a63b5b5422efe523d10d360650ecf9c67 (diff)
parent5a0257d463fc31621d8cdb8664ebba95dc765ed6 (diff)
downloadpodman-f6f6edc4800a6cf186f526d132b6008c01f1a061.tar.gz
podman-f6f6edc4800a6cf186f526d132b6008c01f1a061.tar.bz2
podman-f6f6edc4800a6cf186f526d132b6008c01f1a061.zip
Merge pull request #10408 from Luap99/fix-10283
Fix network create macvlan with subnet option
Diffstat (limited to 'test')
-rw-r--r--test/e2e/network_test.go26
1 files changed, 23 insertions, 3 deletions
diff --git a/test/e2e/network_test.go b/test/e2e/network_test.go
index 6f28d7e19..a7e61932e 100644
--- a/test/e2e/network_test.go
+++ b/test/e2e/network_test.go
@@ -533,7 +533,11 @@ var _ = Describe("Podman network", func() {
out, err := inspect.jq(".[0].plugins[0].master")
Expect(err).To(BeNil())
- Expect(out).To(Equal("\"lo\""))
+ Expect(out).To(Equal(`"lo"`))
+
+ ipamType, err := inspect.jq(".[0].plugins[0].ipam.type")
+ Expect(err).To(BeNil())
+ Expect(ipamType).To(Equal(`"dhcp"`))
nc = podmanTest.Podman([]string{"network", "rm", net})
nc.WaitWithDefaultTimeout()
@@ -571,13 +575,29 @@ var _ = Describe("Podman network", func() {
Expect(err).To(BeNil())
Expect(mtu).To(Equal("1500"))
+ name, err := inspect.jq(".[0].plugins[0].type")
+ Expect(err).To(BeNil())
+ Expect(name).To(Equal(`"macvlan"`))
+
+ netInt, err := inspect.jq(".[0].plugins[0].master")
+ Expect(err).To(BeNil())
+ Expect(netInt).To(Equal(`"lo"`))
+
+ ipamType, err := inspect.jq(".[0].plugins[0].ipam.type")
+ Expect(err).To(BeNil())
+ Expect(ipamType).To(Equal(`"host-local"`))
+
gw, err := inspect.jq(".[0].plugins[0].ipam.ranges[0][0].gateway")
Expect(err).To(BeNil())
- Expect(gw).To(Equal("\"192.168.1.254\""))
+ 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\""))
+ Expect(subnet).To(Equal(`"192.168.1.0/24"`))
+
+ routes, err := inspect.jq(".[0].plugins[0].ipam.routes[0].dst")
+ Expect(err).To(BeNil())
+ Expect(routes).To(Equal(`"0.0.0.0/0"`))
nc = podmanTest.Podman([]string{"network", "rm", net})
nc.WaitWithDefaultTimeout()