summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-09-29 15:34:37 +0000
committerGitHub <noreply@github.com>2020-09-29 15:34:37 +0000
commit63f0bb93f8b51945e37ad04e977d57942f4dd148 (patch)
tree621c068638bb457f3695407b77bfb5ce7de4f0e5 /test
parent53aa9764c48783814710919f1b78185cd13db35c (diff)
parentb6176d8987a0049a253fd7a70b2cd8e17bd50b53 (diff)
downloadpodman-63f0bb93f8b51945e37ad04e977d57942f4dd148.tar.gz
podman-63f0bb93f8b51945e37ad04e977d57942f4dd148.tar.bz2
podman-63f0bb93f8b51945e37ad04e977d57942f4dd148.zip
Merge pull request #7783 from ashley-cui/slirp
Add support for slirp network for pods
Diffstat (limited to 'test')
-rw-r--r--test/e2e/pod_create_test.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/e2e/pod_create_test.go b/test/e2e/pod_create_test.go
index ce0b51517..f69b6ca7b 100644
--- a/test/e2e/pod_create_test.go
+++ b/test/e2e/pod_create_test.go
@@ -416,4 +416,16 @@ entrypoint ["/fromimage"]
Expect(check2.ExitCode()).To(Equal(0))
Expect(check2.OutputToString()).To(Equal("/fromcommand:[/fromcommand]"))
})
+
+ It("podman create pod with slirp network option", func() {
+ name := "test"
+ session := podmanTest.Podman([]string{"pod", "create", "--name", name, "--network", "slirp4netns:port_handler=slirp4netns", "-p", "8082:8000"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+
+ check := podmanTest.Podman([]string{"pod", "inspect", "--format", "{{.InfraConfig.NetworkOptions.slirp4netns}}", name})
+ check.WaitWithDefaultTimeout()
+ Expect(check.ExitCode()).To(Equal(0))
+ Expect(check.OutputToString()).To(Equal("[port_handler=slirp4netns]"))
+ })
})