(t *testing.T)
| 74 | } |
| 75 | |
| 76 | func TestLocalComposeLogsFollow(t *testing.T) { |
| 77 | c := NewCLI(t, WithEnv("REPEAT=20")) |
| 78 | const projectName = "compose-e2e-logs" |
| 79 | t.Cleanup(func() { |
| 80 | c.RunDockerComposeCmd(t, "--project-name", projectName, "down") |
| 81 | }) |
| 82 | |
| 83 | c.RunDockerComposeCmd(t, "-f", "./fixtures/logs-test/compose.yaml", "--project-name", projectName, "up", "-d", "ping") |
| 84 | |
| 85 | cmd := c.NewDockerComposeCmd(t, "--project-name", projectName, "logs", "-f") |
| 86 | res := icmd.StartCmd(cmd) |
| 87 | t.Cleanup(func() { |
| 88 | _ = res.Cmd.Process.Kill() |
| 89 | }) |
| 90 | |
| 91 | poll.WaitOn(t, expectOutput(res, "ping-1 "), poll.WithDelay(100*time.Millisecond), poll.WithTimeout(1*time.Second)) |
| 92 | |
| 93 | c.RunDockerComposeCmd(t, "-f", "./fixtures/logs-test/compose.yaml", "--project-name", projectName, "up", "-d") |
| 94 | |
| 95 | poll.WaitOn(t, expectOutput(res, "hello-1 "), poll.WithDelay(100*time.Millisecond), poll.WithTimeout(1*time.Second)) |
| 96 | |
| 97 | c.RunDockerComposeCmd(t, "-f", "./fixtures/logs-test/compose.yaml", "--project-name", projectName, "up", "-d", "--scale", "ping=2", "ping") |
| 98 | |
| 99 | poll.WaitOn(t, expectOutput(res, "ping-2 "), poll.WithDelay(100*time.Millisecond), poll.WithTimeout(20*time.Second)) |
| 100 | } |
| 101 | |
| 102 | func TestLocalComposeLargeLogs(t *testing.T) { |
| 103 | const projectName = "compose-e2e-large_logs" |
nothing calls this directly
no test coverage detected