diff options
Diffstat (limited to 'test/e2e/run_cgroup_parent_test.go')
-rw-r--r-- | test/e2e/run_cgroup_parent_test.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/test/e2e/run_cgroup_parent_test.go b/test/e2e/run_cgroup_parent_test.go index e0e1d4b1d..6bdc6af08 100644 --- a/test/e2e/run_cgroup_parent_test.go +++ b/test/e2e/run_cgroup_parent_test.go @@ -48,21 +48,22 @@ var _ = Describe("Podman run with --cgroup-parent", func() { run := podmanTest.Podman([]string{"run", "--cgroupns=host", "--cgroup-parent", cgroup, fedoraMinimal, "cat", "/proc/self/cgroup"}) run.WaitWithDefaultTimeout() Expect(run).Should(Exit(0)) - ok, _ := run.GrepString(cgroup) - Expect(ok).To(BeTrue()) + Expect(run.OutputToString()).To(ContainSubstring(cgroup)) }) Specify("no --cgroup-parent", func() { - SkipIfRootless("FIXME This seems to be broken in rootless mode") cgroup := "/libpod_parent" if !Containerized() && podmanTest.CgroupManager != "cgroupfs" { - cgroup = "/machine.slice" + if isRootless() { + cgroup = "/user.slice" + } else { + cgroup = "/machine.slice" + } } run := podmanTest.Podman([]string{"run", "--cgroupns=host", fedoraMinimal, "cat", "/proc/self/cgroup"}) run.WaitWithDefaultTimeout() Expect(run).Should(Exit(0)) - ok, _ := run.GrepString(cgroup) - Expect(ok).To(BeTrue()) + Expect(run.OutputToString()).To(ContainSubstring(cgroup)) }) Specify("always honor --cgroup-parent", func() { @@ -114,7 +115,6 @@ var _ = Describe("Podman run with --cgroup-parent", func() { run := podmanTest.Podman([]string{"run", "--cgroupns=host", "--cgroup-parent", cgroup, fedoraMinimal, "cat", "/proc/1/cgroup"}) run.WaitWithDefaultTimeout() Expect(run).Should(Exit(0)) - ok, _ := run.GrepString(cgroup) - Expect(ok).To(BeTrue()) + Expect(run.OutputToString()).To(ContainSubstring(cgroup)) }) }) |