(t *testing.T)
| 100 | } |
| 101 | |
| 102 | func TestLocalComposeLargeLogs(t *testing.T) { |
| 103 | const projectName = "compose-e2e-large_logs" |
| 104 | file := filepath.Join(t.TempDir(), "large.txt") |
| 105 | c := NewCLI(t, WithEnv("FILE="+file)) |
| 106 | t.Cleanup(func() { |
| 107 | c.RunDockerComposeCmd(t, "--project-name", projectName, "down") |
| 108 | }) |
| 109 | |
| 110 | f, err := os.Create(file) |
| 111 | assert.NilError(t, err) |
| 112 | for i := range 300_000 { |
| 113 | _, err := io.WriteString(f, fmt.Sprintf("This is line %d in a laaaarge text file\n", i)) |
| 114 | assert.NilError(t, err) |
| 115 | } |
| 116 | assert.NilError(t, f.Close()) |
| 117 | |
| 118 | cmd := c.NewDockerComposeCmd(t, "-f", "./fixtures/logs-test/cat.yaml", "--project-name", projectName, "up", "--abort-on-container-exit", "--menu=false") |
| 119 | cmd.Stdout = io.Discard |
| 120 | res := icmd.RunCmd(cmd) |
| 121 | res.Assert(t, icmd.Expected{Out: "test-1 exited with code 0"}) |
| 122 | } |
| 123 | |
| 124 | func expectOutput(res *icmd.Result, expected string) func(t poll.LogT) poll.Result { |
| 125 | return func(t poll.LogT) poll.Result { |
nothing calls this directly
no test coverage detected