diff options
Diffstat (limited to 'test/e2e')
-rw-r--r-- | test/e2e/inspect_test.go | 10 | ||||
-rw-r--r-- | test/e2e/logs_test.go | 10 | ||||
-rw-r--r-- | test/e2e/rm_test.go | 14 |
3 files changed, 34 insertions, 0 deletions
diff --git a/test/e2e/inspect_test.go b/test/e2e/inspect_test.go index ebe610e6a..34328828f 100644 --- a/test/e2e/inspect_test.go +++ b/test/e2e/inspect_test.go @@ -66,6 +66,16 @@ var _ = Describe("Podman inspect", func() { Expect(session.ExitCode()).To(Equal(0)) }) + It("podman inspect container with GO format for ConmonPidFile", func() { + SkipIfRemote() + session, ec, _ := podmanTest.RunLsContainer("test1") + Expect(ec).To(Equal(0)) + + session = podmanTest.Podman([]string{"inspect", "--format", "{{.ConmonPidFile}}", "test1"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + }) + It("podman inspect container with size", func() { SkipIfRemote() _, ec, _ := podmanTest.RunLsContainer("") diff --git a/test/e2e/logs_test.go b/test/e2e/logs_test.go index d383a83b3..d051e3dba 100644 --- a/test/e2e/logs_test.go +++ b/test/e2e/logs_test.go @@ -132,4 +132,14 @@ var _ = Describe("Podman logs", func() { Expect(len(output)).To(Equal(6)) Expect(strings.Contains(output[0], cid1[:12]) || strings.Contains(output[0], cid2[:12])).To(BeTrue()) }) + + It("podman logs on a created container should result in 0 exit code", func() { + session := podmanTest.Podman([]string{"create", "-dt", "--name", "log", ALPINE}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(BeZero()) + + results := podmanTest.Podman([]string{"logs", "log"}) + results.WaitWithDefaultTimeout() + Expect(results.ExitCode()).To(BeZero()) + }) }) diff --git a/test/e2e/rm_test.go b/test/e2e/rm_test.go index 1f67780da..9bf742a63 100644 --- a/test/e2e/rm_test.go +++ b/test/e2e/rm_test.go @@ -139,9 +139,23 @@ var _ = Describe("Podman rm", func() { Expect(podmanTest.NumberOfContainers()).To(Equal(1)) }) + It("podman rm bogus container", func() { session := podmanTest.Podman([]string{"rm", "bogus"}) session.WaitWithDefaultTimeout() Expect(session.ExitCode()).To(Equal(1)) }) + It("podman rm bogus container and a running container", func() { + session := podmanTest.RunTopContainer("test1") + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + + session = podmanTest.Podman([]string{"rm", "bogus", "test1"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(125)) + + session = podmanTest.Podman([]string{"rm", "test1", "bogus"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(125)) + }) }) |