diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-12-29 12:16:43 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-29 12:16:43 +0100 |
commit | 9e03aa14b63f9351926071ba0a8b7064154cb0fe (patch) | |
tree | 59a63f7bf23d72f3a3ad65d968edb5457f91602a /test/e2e | |
parent | fa551fd16d20d8a427cb988feb8428c91827a21d (diff) | |
parent | 8bc394ce6ec597f3c5bfb0fab5eb39b51afbe67d (diff) | |
download | podman-9e03aa14b63f9351926071ba0a8b7064154cb0fe.tar.gz podman-9e03aa14b63f9351926071ba0a8b7064154cb0fe.tar.bz2 podman-9e03aa14b63f9351926071ba0a8b7064154cb0fe.zip |
Merge pull request #4748 from NevilleC/nc-podname
[Issue #4703] Add the pod name when we use `podman ps -p`
Diffstat (limited to 'test/e2e')
-rw-r--r-- | test/e2e/ps_test.go | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/e2e/ps_test.go b/test/e2e/ps_test.go index 362c7aabb..12bfdfe41 100644 --- a/test/e2e/ps_test.go +++ b/test/e2e/ps_test.go @@ -306,7 +306,29 @@ var _ = Describe("Podman ps", func() { Expect(session.ExitCode()).To(Equal(0)) Expect(session.OutputToString()).To(ContainSubstring(podid)) + }) + + It("podman --pod with a non-empty pod name", func() { + SkipIfRemote() + + podName := "testPodName" + _, ec, podid := podmanTest.CreatePod(podName) + Expect(ec).To(Equal(0)) + + session := podmanTest.RunTopContainerInPod("", podName) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + + // "--no-trunc" must be given. If not it will trunc the pod ID + // in the output and you will have to trunc it in the test too. + session = podmanTest.Podman([]string{"ps", "--pod", "--no-trunc"}) + + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + output := session.OutputToString() + Expect(output).To(ContainSubstring(podid)) + Expect(output).To(ContainSubstring(podName)) }) It("podman ps test with port range", func() { |