aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2019-06-17 10:52:04 +0200
committerGiuseppe Scrivano <gscrivan@redhat.com>2019-06-17 11:04:34 +0200
commit6b7649e4ba41aa050ed1c77da395aa103a39fab9 (patch)
treee4d495573c22d1bbf42bfc562b5e50d0caf8b8bf /test
parent670fc030886938b4ee93aa2ddd5db6c947bd975a (diff)
downloadpodman-6b7649e4ba41aa050ed1c77da395aa103a39fab9.tar.gz
podman-6b7649e4ba41aa050ed1c77da395aa103a39fab9.tar.bz2
podman-6b7649e4ba41aa050ed1c77da395aa103a39fab9.zip
test: add test for logs -f
discussion here: https://github.com/containers/libpod/issues/3325#issuecomment-502214492 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'test')
-rw-r--r--test/e2e/logs_test.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/e2e/logs_test.go b/test/e2e/logs_test.go
index cc50c4d95..d17f60a5d 100644
--- a/test/e2e/logs_test.go
+++ b/test/e2e/logs_test.go
@@ -218,4 +218,21 @@ var _ = Describe("Podman logs", func() {
Expect(results.ExitCode()).To(Equal(0))
Expect(len(results.OutputToStringArray())).To(Equal(3))
})
+
+ It("podman logs -f two lines", func() {
+ containerName := "logs-f-rm"
+
+ logc := podmanTest.Podman([]string{"run", "--rm", "--name", containerName, "-dt", ALPINE, "sh", "-c", "echo podman; sleep 1; echo podman"})
+ logc.WaitWithDefaultTimeout()
+ Expect(logc.ExitCode()).To(Equal(0))
+
+ results := podmanTest.Podman([]string{"logs", "-f", containerName})
+ results.WaitWithDefaultTimeout()
+ Expect(results.ExitCode()).To(Equal(0))
+
+ // Verify that the cleanup process worked correctly and we can recreate a container with the same name
+ logc = podmanTest.Podman([]string{"run", "--rm", "--name", containerName, "-dt", ALPINE, "true"})
+ logc.WaitWithDefaultTimeout()
+ Expect(logc.ExitCode()).To(Equal(0))
+ })
})