summaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-11-18 12:19:57 +0100
committerGitHub <noreply@github.com>2020-11-18 12:19:57 +0100
commite4e92d6104cc5d60b2e771d2d8fbab61e96748a9 (patch)
treec5227aac15526a287ea5de2f30b0550ad60da3b2 /test/e2e
parenta6f7afd41729edbe0d8cbf21bab5b475c6a13f9e (diff)
parent76a38fc3f236f9197ab0761d5cc11cb37cee5e41 (diff)
downloadpodman-e4e92d6104cc5d60b2e771d2d8fbab61e96748a9.tar.gz
podman-e4e92d6104cc5d60b2e771d2d8fbab61e96748a9.tar.bz2
podman-e4e92d6104cc5d60b2e771d2d8fbab61e96748a9.zip
Merge pull request #8386 from zhangguanzhang/pod-inspect-mac
Fix podman pod inspect show wrong StaticMAC
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/pod_inspect_test.go19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/e2e/pod_inspect_test.go b/test/e2e/pod_inspect_test.go
index ccdf0a423..25212991d 100644
--- a/test/e2e/pod_inspect_test.go
+++ b/test/e2e/pod_inspect_test.go
@@ -99,4 +99,23 @@ var _ = Describe("Podman pod inspect", func() {
Expect(len(inspectJSON.InfraConfig.PortBindings["80/tcp"])).To(Equal(1))
Expect(inspectJSON.InfraConfig.PortBindings["80/tcp"][0].HostPort).To(Equal("8080"))
})
+
+ It("podman pod inspect outputs show correct MAC", func() {
+ SkipIfRootless("--mac-address is not supported in rootless mode")
+ podName := "testPod"
+ macAddr := "42:43:44:00:00:01"
+ create := podmanTest.Podman([]string{"pod", "create", "--name", podName, "--mac-address", macAddr})
+ create.WaitWithDefaultTimeout()
+ Expect(create.ExitCode()).To(Equal(0))
+
+ create = podmanTest.Podman([]string{"run", "-d", "--pod", podName, ALPINE, "top"})
+ create.WaitWithDefaultTimeout()
+ Expect(create.ExitCode()).To(Equal(0))
+
+ inspectOut := podmanTest.Podman([]string{"pod", "inspect", podName})
+ inspectOut.WaitWithDefaultTimeout()
+ Expect(inspectOut.ExitCode()).To(Equal(0))
+
+ Expect(inspectOut.OutputToString()).To(ContainSubstring(macAddr))
+ })
})