summaryrefslogtreecommitdiff
path: root/test/e2e/logs_test.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-11-12 12:00:38 +0100
committerGitHub <noreply@github.com>2020-11-12 12:00:38 +0100
commit6c2503ca04d0224a22ae687337436a3ffeb6579d (patch)
tree0af7f13bdafab791c4ad5d3fd08b06653c707933 /test/e2e/logs_test.go
parent53c60a68db23aaf35359bb4e5e9cbecf8f5d0e6b (diff)
parent0fc3c0d91bf80e4677d637b94dd77c37110804e9 (diff)
downloadpodman-6c2503ca04d0224a22ae687337436a3ffeb6579d.tar.gz
podman-6c2503ca04d0224a22ae687337436a3ffeb6579d.tar.bz2
podman-6c2503ca04d0224a22ae687337436a3ffeb6579d.zip
Merge pull request #8272 from rhatdan/logs
Test podman-remote logs works the same as podman logs
Diffstat (limited to 'test/e2e/logs_test.go')
-rw-r--r--test/e2e/logs_test.go18
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"))
+ })
})