From 03e99c9b40d3ad4ba33fb63d2a3de781527ce345 Mon Sep 17 00:00:00 2001 From: jgallucci32 Date: Wed, 17 Jun 2020 07:08:52 -0700 Subject: Revert #6591 to fix issue with failed tests Signed-off-by: jgallucci32 --- libpod/container_log.go | 23 ----------------------- test/e2e/logs_test.go | 12 ------------ 2 files changed, 35 deletions(-) diff --git a/libpod/container_log.go b/libpod/container_log.go index 39c395fe6..c3a84d048 100644 --- a/libpod/container_log.go +++ b/libpod/container_log.go @@ -2,7 +2,6 @@ package libpod import ( "os" - "time" "github.com/containers/libpod/libpod/define" "github.com/containers/libpod/libpod/logs" @@ -73,27 +72,5 @@ func (c *Container) readFromLogFile(options *logs.LogOptions, logChannel chan *l } options.WaitGroup.Done() }() - // Check if container is still running or paused - go func() { - if options.Follow { - for { - state, err := c.State() - if err != nil && errors.Cause(err) != define.ErrNoSuchCtr { - logrus.Error(err) - break - } else if err != nil { - break - } - if state != define.ContainerStateRunning && state != define.ContainerStatePaused { - err := t.Stop() - if err != nil { - logrus.Error(err) - } - break - } - time.Sleep(1 * time.Second) - } - } - }() return nil } diff --git a/test/e2e/logs_test.go b/test/e2e/logs_test.go index 5d8ce24e9..c12ae9c86 100644 --- a/test/e2e/logs_test.go +++ b/test/e2e/logs_test.go @@ -300,16 +300,4 @@ var _ = Describe("Podman logs", func() { Expect(inspect.ErrorToString()).To(ContainSubstring("no such container")) } }) - - 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