diff options
author | Brent Baude <bbaude@redhat.com> | 2020-04-25 13:11:08 -0500 |
---|---|---|
committer | Brent Baude <bbaude@redhat.com> | 2020-04-25 13:13:32 -0500 |
commit | 942a3ef588c01e60bcaed94d32547219b15fd0ab (patch) | |
tree | 1f34dfb751a4725b002ceb5b8240a1fc79ae188e /test/e2e | |
parent | 2afe579c064923841a55d57458fac4d91bec8173 (diff) | |
download | podman-942a3ef588c01e60bcaed94d32547219b15fd0ab.tar.gz podman-942a3ef588c01e60bcaed94d32547219b15fd0ab.tar.bz2 podman-942a3ef588c01e60bcaed94d32547219b15fd0ab.zip |
Enable pod ps integration tests
Enable integration tests for pod ps.
In addition, fixed bug where output was still using slice go template routines and would fail when no infra container was present. Added integration test to prevent future regressions.
Signed-off-by: Brent Baude <bbaude@redhat.com>
Diffstat (limited to 'test/e2e')
-rw-r--r-- | test/e2e/pod_ps_test.go | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/test/e2e/pod_ps_test.go b/test/e2e/pod_ps_test.go index ea9118f37..5f8712a7a 100644 --- a/test/e2e/pod_ps_test.go +++ b/test/e2e/pod_ps_test.go @@ -18,7 +18,6 @@ var _ = Describe("Podman ps", func() { ) BeforeEach(func() { - Skip(v2fail) tempdir, err = CreateTempDirInTempDir() if err != nil { os.Exit(1) @@ -96,6 +95,7 @@ var _ = Describe("Podman ps", func() { Expect(result.OutputToString()).To(ContainSubstring(podid2)) Expect(result.OutputToString()).To(Not(ContainSubstring(podid1))) }) + It("podman pod ps id filter flag", func() { _, ec, podid := podmanTest.CreatePod("") Expect(ec).To(Equal(0)) @@ -143,7 +143,7 @@ var _ = Describe("Podman ps", func() { _, ec, _ = podmanTest.RunLsContainerInPod("test2", podid) Expect(ec).To(Equal(0)) - session = podmanTest.Podman([]string{"pod", "ps", "--format={{.ContainerInfo}}", "--ctr-names"}) + session = podmanTest.Podman([]string{"pod", "ps", "--format={{.ContainerNames}}", "--ctr-names"}) session.WaitWithDefaultTimeout() Expect(session.ExitCode()).To(Equal(0)) Expect(session.OutputToString()).To(ContainSubstring("test1")) @@ -228,4 +228,18 @@ var _ = Describe("Podman ps", func() { Expect(session.OutputToString()).To(ContainSubstring(podid2)) Expect(session.OutputToString()).To(Not(ContainSubstring(podid3))) }) + + It("pod no infra should ps", func() { + session := podmanTest.Podman([]string{"pod", "create", "--infra=false"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + + ps := podmanTest.Podman([]string{"pod", "ps"}) + ps.WaitWithDefaultTimeout() + Expect(ps.ExitCode()).To(Equal(0)) + + infra := podmanTest.Podman([]string{"pod", "ps", "--format", "{{.InfraId}}"}) + infra.WaitWithDefaultTimeout() + Expect(len(infra.OutputToString())).To(BeZero()) + }) }) |