From 033743cbee180d9a4149f574375cc1201e573d06 Mon Sep 17 00:00:00 2001 From: Qi Wang Date: Wed, 10 Jun 2020 14:14:01 -0400 Subject: Fix -f logs follow with stopped container Fix -f logs follow with stopped container. Close #6531 Signed-off-by: Qi Wang --- test/e2e/logs_test.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'test') diff --git a/test/e2e/logs_test.go b/test/e2e/logs_test.go index f36163ccc..f9446e0c6 100644 --- a/test/e2e/logs_test.go +++ b/test/e2e/logs_test.go @@ -288,4 +288,16 @@ var _ = Describe("Podman logs", func() { logc.WaitWithDefaultTimeout() Expect(logc).To(Exit(0)) }) + + It("follow output stopped container", func() { + containerName := "logs-f" + + logc := podmanTest.Podman([]string{"run", "--name", containerName, "-d", ALPINE}) + logc.WaitWithDefaultTimeout() + Expect(logc).To(Exit(0)) + + results := podmanTest.Podman([]string{"logs", "-f", containerName}) + results.WaitWithDefaultTimeout() + Expect(results).To(Exit(0)) + }) }) -- cgit v1.2.3-54-g00ecf