diff options
author | Ashley Cui <acui@redhat.com> | 2020-09-25 10:00:43 -0400 |
---|---|---|
committer | Ashley Cui <acui@redhat.com> | 2020-09-25 21:34:23 -0400 |
commit | b6176d8987a0049a253fd7a70b2cd8e17bd50b53 (patch) | |
tree | e4ce740ebc925079ab223b41acec4c15b85b6fd9 /test/e2e | |
parent | 98aa458c7a13c72fabe02cd0ed2919c2801ef207 (diff) | |
download | podman-b6176d8987a0049a253fd7a70b2cd8e17bd50b53.tar.gz podman-b6176d8987a0049a253fd7a70b2cd8e17bd50b53.tar.bz2 podman-b6176d8987a0049a253fd7a70b2cd8e17bd50b53.zip |
Add support for slirp network for pods
flag --network=slirp4netns[options] for root and rootless pods
Signed-off-by: Ashley Cui <acui@redhat.com>
Diffstat (limited to 'test/e2e')
-rw-r--r-- | test/e2e/pod_create_test.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/e2e/pod_create_test.go b/test/e2e/pod_create_test.go index ed62e8a4b..c540b6e54 100644 --- a/test/e2e/pod_create_test.go +++ b/test/e2e/pod_create_test.go @@ -405,4 +405,16 @@ entrypoint ["/fromimage"] Expect(check1.ExitCode()).To(Equal(0)) Expect(check1.OutputToString()).To(Equal("/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]")) + }) }) |