diff options
author | Neville Cain <neville.cain@qonto.eu> | 2019-12-25 02:46:39 +0100 |
---|---|---|
committer | Neville Cain <neville.cain@qonto.eu> | 2019-12-28 00:03:57 +0100 |
commit | 8bc394ce6ec597f3c5bfb0fab5eb39b51afbe67d (patch) | |
tree | 1a1bbbbe88c70ee95e28746e413c6d26aff7dfa3 /test/e2e/ps_test.go | |
parent | c759c3f78dcbbf5dec462a863ad25cd41a1707b7 (diff) | |
download | podman-8bc394ce6ec597f3c5bfb0fab5eb39b51afbe67d.tar.gz podman-8bc394ce6ec597f3c5bfb0fab5eb39b51afbe67d.tar.bz2 podman-8bc394ce6ec597f3c5bfb0fab5eb39b51afbe67d.zip |
Add the pod name when we use `podman ps -p`
The pod name does not appear when doing `podman ps -p`.
It is missing as the documentation says:
-p, --pod Print the ID and name of the pod the containers are associated with
The pod name is added in the ps output and checked in unit tests.
Closes #4703
Signed-off-by: NevilleC <neville.cain@qonto.eu>
Diffstat (limited to 'test/e2e/ps_test.go')
-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 a436d4f09..17be114ba 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() { |