diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-10-05 12:11:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-05 12:11:41 +0200 |
commit | a9d572f40f006a69b9d0634afea142d37c071474 (patch) | |
tree | b77c5a60e53e0173ad2840e4c0cb21792cbe8dbc /test | |
parent | 7353000a06f3636515ebcd3b79ca8309db48b693 (diff) | |
parent | 4a2c4c3989938ebc25a2d0d902aff51aaa5b6c45 (diff) | |
download | podman-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')
-rw-r--r-- | test/e2e/pod_infra_container_test.go | 3 | ||||
-rw-r--r-- | test/e2e/ps_test.go | 12 |
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() |