diff options
Diffstat (limited to 'test/e2e/containers_conf_test.go')
-rw-r--r-- | test/e2e/containers_conf_test.go | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/test/e2e/containers_conf_test.go b/test/e2e/containers_conf_test.go index 8339b7732..ddb62c327 100644 --- a/test/e2e/containers_conf_test.go +++ b/test/e2e/containers_conf_test.go @@ -41,7 +41,7 @@ var _ = Describe("Podman run", func() { }) It("podman run limits test", func() { - SkipIfRootless() + SkipIfRootlessCgroupsV1() //containers.conf is set to "nofile=500:500" session := podmanTest.Podman([]string{"run", "--rm", fedoraMinimal, "ulimit", "-n"}) session.WaitWithDefaultTimeout() @@ -80,7 +80,6 @@ var _ = Describe("Podman run", func() { }) It("podman Capabilities in containers.conf", func() { - SkipIfRootless() os.Setenv("CONTAINERS_CONF", "config/containers.conf") cap := podmanTest.Podman([]string{"run", ALPINE, "grep", "CapEff", "/proc/self/status"}) cap.WaitWithDefaultTimeout() @@ -94,7 +93,6 @@ var _ = Describe("Podman run", func() { }) It("podman Regular capabilities", func() { - SkipIfRootless() os.Setenv("CONTAINERS_CONF", "config/containers.conf") setup := podmanTest.RunTopContainer("test1") setup.WaitWithDefaultTimeout() @@ -176,12 +174,17 @@ var _ = Describe("Podman run", func() { }) It("podman run containers.conf sysctl test", func() { - SkipIfRootless() //containers.conf is set to "net.ipv4.ping_group_range=0 1000" session := podmanTest.Podman([]string{"run", "--rm", fedoraMinimal, "cat", "/proc/sys/net/ipv4/ping_group_range"}) session.WaitWithDefaultTimeout() Expect(session.ExitCode()).To(Equal(0)) Expect(session.OutputToString()).To(ContainSubstring("1000")) + + // Ignore containers.conf setting if --net=host + session = podmanTest.Podman([]string{"run", "--rm", "--net", "host", fedoraMinimal, "cat", "/proc/sys/net/ipv4/ping_group_range"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + Expect(session.OutputToString()).ToNot((ContainSubstring("1000"))) }) It("podman run containers.conf search domain", func() { |