summaryrefslogtreecommitdiff
path: root/test/e2e/rootless_test.go
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2019-03-17 21:46:37 +0100
committerGiuseppe Scrivano <gscrivan@redhat.com>2019-03-18 11:40:22 +0100
commit46b74a8ff8dea146539fa731cc5746fc5a59e186 (patch)
treeb84efa30a63a9f2b06761a07aeadc9b84b7e7935 /test/e2e/rootless_test.go
parent8aed32acea9bb35898abcee58fc9aa2a03ef264a (diff)
downloadpodman-46b74a8ff8dea146539fa731cc5746fc5a59e186.tar.gz
podman-46b74a8ff8dea146539fa731cc5746fc5a59e186.tar.bz2
podman-46b74a8ff8dea146539fa731cc5746fc5a59e186.zip
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>
Diffstat (limited to 'test/e2e/rootless_test.go')
-rw-r--r--test/e2e/rootless_test.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/e2e/rootless_test.go b/test/e2e/rootless_test.go
index cd771e2ba..57146bca0 100644
--- a/test/e2e/rootless_test.go
+++ b/test/e2e/rootless_test.go
@@ -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)
})