diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2020-11-08 07:33:08 -0500 |
---|---|---|
committer | Daniel J Walsh <dwalsh@redhat.com> | 2020-11-10 13:40:56 -0500 |
commit | 0fc3c0d91bf80e4677d637b94dd77c37110804e9 (patch) | |
tree | 2ac6c5968de5bd1051c2ca8572505a4c7d67fab6 /test/e2e | |
parent | ca672373b5def7b4aed695622ba560fb407f1bf9 (diff) | |
download | podman-0fc3c0d91bf80e4677d637b94dd77c37110804e9.tar.gz podman-0fc3c0d91bf80e4677d637b94dd77c37110804e9.tar.bz2 podman-0fc3c0d91bf80e4677d637b94dd77c37110804e9.zip |
Add tests to make sure podman-remote logs works correctly.
Fixes: https://github.com/containers/podman/issues/7942
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'test/e2e')
-rw-r--r-- | test/e2e/logs_test.go | 18 |
1 files changed, 18 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")) + }) }) |