summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorzhangguanzhang <zhangguanzhang@qq.com>2020-10-03 21:45:38 +0800
committerzhangguanzhang <zhangguanzhang@qq.com>2020-10-04 19:48:13 +0800
commit4a2c4c3989938ebc25a2d0d902aff51aaa5b6c45 (patch)
treebf312725a0e358d6c19c1424e0976f15864488d0 /test
parent7c12967257742063206c05f0baec517bc08cbeb6 (diff)
downloadpodman-4a2c4c3989938ebc25a2d0d902aff51aaa5b6c45.tar.gz
podman-4a2c4c3989938ebc25a2d0d902aff51aaa5b6c45.tar.bz2
podman-4a2c4c3989938ebc25a2d0d902aff51aaa5b6c45.zip
Fix podman-remote ps --ns broken
Signed-off-by: zhangguanzhang <zhangguanzhang@qq.com>
Diffstat (limited to 'test')
-rw-r--r--test/e2e/pod_infra_container_test.go3
-rw-r--r--test/e2e/ps_test.go12
2 files changed, 12 insertions, 3 deletions
diff --git a/test/e2e/pod_infra_container_test.go b/test/e2e/pod_infra_container_test.go
index 515391f92..063c71b9f 100644
--- a/test/e2e/pod_infra_container_test.go
+++ b/test/e2e/pod_infra_container_test.go
@@ -225,7 +225,6 @@ var _ = Describe("Podman pod create", func() {
})
It("podman pod container can override pod pid NS", func() {
- SkipIfRemote("FIXME This should work on podman-remote")
session := podmanTest.Podman([]string{"pod", "create", "--share", "pid"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
@@ -257,7 +256,6 @@ var _ = Describe("Podman pod create", func() {
})
It("podman pod container can override pod not sharing pid", func() {
- SkipIfRemote("FIXME This should work on podman-remote")
session := podmanTest.Podman([]string{"pod", "create", "--share", "net"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
@@ -283,7 +281,6 @@ var _ = Describe("Podman pod create", func() {
})
It("podman pod container can override pod ipc NS", func() {
- SkipIfRemote("FIXME This should work on podman-remote")
session := podmanTest.Podman([]string{"pod", "create", "--share", "ipc"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
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()