summaryrefslogtreecommitdiff
path: root/test/e2e/ps_test.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-10-05 12:11:41 +0200
committerGitHub <noreply@github.com>2020-10-05 12:11:41 +0200
commita9d572f40f006a69b9d0634afea142d37c071474 (patch)
treeb77c5a60e53e0173ad2840e4c0cb21792cbe8dbc /test/e2e/ps_test.go
parent7353000a06f3636515ebcd3b79ca8309db48b693 (diff)
parent4a2c4c3989938ebc25a2d0d902aff51aaa5b6c45 (diff)
downloadpodman-a9d572f40f006a69b9d0634afea142d37c071474.tar.gz
podman-a9d572f40f006a69b9d0634afea142d37c071474.tar.bz2
podman-a9d572f40f006a69b9d0634afea142d37c071474.zip
Merge pull request #7909 from zhangguanzhang/remote-ps-ns-broken
Fix podman-remote ps --ns broken
Diffstat (limited to 'test/e2e/ps_test.go')
-rw-r--r--test/e2e/ps_test.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/e2e/ps_test.go b/test/e2e/ps_test.go
index 82a842146..0f2ce2d46 100644
--- a/test/e2e/ps_test.go
+++ b/test/e2e/ps_test.go
@@ -173,6 +173,18 @@ var _ = Describe("Podman ps", func() {
Expect(len(result.OutputToStringArray())).Should(BeNumerically(">", 0))
})
+ It("podman ps namespace flag even for remote", func() {
+ session := podmanTest.RunTopContainer("test1")
+ session.WaitWithDefaultTimeout()
+
+ result := podmanTest.Podman([]string{"ps", "-a", "--namespace", "--format",
+ "{{with .Namespaces}}{{.Cgroup}}:{{.IPC}}:{{.MNT}}:{{.NET}}:{{.PIDNS}}:{{.User}}:{{.UTS}}{{end}}"})
+ result.WaitWithDefaultTimeout()
+ Expect(result.ExitCode()).To(Equal(0))
+ // it must contains `::` when some ns is null. If it works normally, it should be "$num1:$num2:$num3"
+ Expect(result.OutputToString()).To(Not(ContainSubstring(`::`)))
+ })
+
It("podman ps with no containers is valid json format", func() {
result := podmanTest.Podman([]string{"ps", "--format", "json"})
result.WaitWithDefaultTimeout()