mirror of
https://github.com/containers/podman.git
synced 2025-12-05 12:52:12 +08:00
rootless: fix pod top
we need to join the namespace of the target pod. Closes: https://github.com/containers/libpod/issues/2682 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
@@ -138,6 +138,21 @@ var _ = Describe("Podman rootless", func() {
|
||||
cmd.WaitWithDefaultTimeout()
|
||||
Expect(cmd.ExitCode()).To(Equal(0))
|
||||
Expect(cmd.LineInOutputContains("hello")).To(BeTrue())
|
||||
|
||||
args = []string{"pod", "top", podId}
|
||||
cmd = rootlessTest.PodmanAsUser(args, 1000, 1000, "", env)
|
||||
cmd.WaitWithDefaultTimeout()
|
||||
Expect(cmd.ExitCode()).To(Not(Equal(0)))
|
||||
|
||||
args = []string{"run", "--pod", podId, "-d", "--rootfs", mountPath, "sleep", "100"}
|
||||
cmd = rootlessTest.PodmanAsUser(args, 1000, 1000, "", env)
|
||||
cmd.WaitWithDefaultTimeout()
|
||||
Expect(cmd.ExitCode()).To(Equal(0))
|
||||
|
||||
args = []string{"pod", "top", podId}
|
||||
cmd = rootlessTest.PodmanAsUser(args, 1000, 1000, "", env)
|
||||
cmd.WaitWithDefaultTimeout()
|
||||
Expect(cmd.ExitCode()).To(Equal(0))
|
||||
}
|
||||
runInRootlessContext(f)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user