test: enable networking test for rootless

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
Giuseppe Scrivano 2020-05-12 11:31:15 +02:00
parent 45e712a2c6
commit 664e0595dd
No known key found for this signature in database
GPG key ID: E4730F97F60286ED

View file

@ -19,7 +19,6 @@ var _ = Describe("Podman run networking", func() {
) )
BeforeEach(func() { BeforeEach(func() {
SkipIfRootlessV2()
tempdir, err = CreateTempDirInTempDir() tempdir, err = CreateTempDirInTempDir()
if err != nil { if err != nil {
os.Exit(1) os.Exit(1)
@ -193,6 +192,8 @@ var _ = Describe("Podman run networking", func() {
}) })
It("podman run network expose duplicate host port results in error", func() { It("podman run network expose duplicate host port results in error", func() {
SkipIfRootless()
session := podmanTest.Podman([]string{"run", "-dt", "-p", "80", ALPINE, "/bin/sh"}) session := podmanTest.Podman([]string{"run", "-dt", "-p", "80", ALPINE, "/bin/sh"})
session.WaitWithDefaultTimeout() session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0)) Expect(session.ExitCode()).To(Equal(0))
@ -202,7 +203,7 @@ var _ = Describe("Podman run networking", func() {
Expect(inspect.ExitCode()).To(Equal(0)) Expect(inspect.ExitCode()).To(Equal(0))
containerConfig := inspect.InspectContainerToJSON() containerConfig := inspect.InspectContainerToJSON()
Expect(containerConfig[0].NetworkSettings.Ports[0].HostPort).ToNot(Equal("80")) Expect(containerConfig[0].NetworkSettings.Ports[0].HostPort).ToNot(Equal(80))
}) })
It("podman run hostname test", func() { It("podman run hostname test", func() {