diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/e2e/logs_test.go | 18 | ||||
-rw-r--r-- | test/e2e/run_volume_test.go | 8 |
2 files changed, 26 insertions, 0 deletions
diff --git a/test/e2e/logs_test.go b/test/e2e/logs_test.go index 4214bd50e..a749a86ff 100644 --- a/test/e2e/logs_test.go +++ b/test/e2e/logs_test.go @@ -337,4 +337,22 @@ var _ = Describe("Podman logs", func() { Expect(results).To(Exit(0)) Expect(results.OutputToString()).To(Equal("podman podman podman")) }) + + It("Make sure logs match expected length", func() { + logc := podmanTest.Podman([]string{"run", "-t", "--name", "test", ALPINE, "sh", "-c", "echo 1; echo 2"}) + logc.WaitWithDefaultTimeout() + Expect(logc).To(Exit(0)) + + wait := podmanTest.Podman([]string{"wait", "test"}) + wait.WaitWithDefaultTimeout() + Expect(wait).To(Exit(0)) + + results := podmanTest.Podman([]string{"logs", "test"}) + results.WaitWithDefaultTimeout() + Expect(results).To(Exit(0)) + outlines := results.OutputToStringArray() + Expect(len(outlines)).To(Equal(2)) + Expect(outlines[0]).To(Equal("1\r")) + Expect(outlines[1]).To(Equal("2\r")) + }) }) diff --git a/test/e2e/run_volume_test.go b/test/e2e/run_volume_test.go index 1c8a67123..7c74cea78 100644 --- a/test/e2e/run_volume_test.go +++ b/test/e2e/run_volume_test.go @@ -540,4 +540,12 @@ VOLUME /test/` session = podmanTest.Podman([]string{"run", "--rm", "-v", fmt.Sprintf("%s:%s:O", mountPath, mountDest), "--mount", fmt.Sprintf("type=tmpfs,target=%s", mountDest), ALPINE}) Expect(session.ExitCode()).To(Not(Equal(0))) }) + + It("same volume in multiple places does not deadlock", func() { + volName := "testVol1" + session := podmanTest.Podman([]string{"run", "-t", "-i", "-v", fmt.Sprintf("%s:/test1", volName), "-v", fmt.Sprintf("%s:/test2", volName), "--rm", ALPINE, "sh", "-c", "mount | grep /test"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + Expect(len(session.OutputToStringArray())).To(Equal(2)) + }) }) |