(t *testing.T)
| 140 | } |
| 141 | |
| 142 | func TestAttachRestart(t *testing.T) { |
| 143 | c := NewParallelCLI(t) |
| 144 | |
| 145 | cmd := c.NewDockerComposeCmd(t, "--ansi=never", "--project-directory", "./fixtures/attach-restart", "up") |
| 146 | res := icmd.StartCmd(cmd) |
| 147 | t.Cleanup(func() { |
| 148 | c.RunDockerComposeCmd(t, "-p", "attach-restart", "down") |
| 149 | }) |
| 150 | |
| 151 | c.WaitForCondition(t, func() (bool, string) { |
| 152 | debug := res.Combined() |
| 153 | return strings.Count(res.Stdout(), |
| 154 | "failing-1 exited with code 1") == 3, fmt.Sprintf("'failing-1 exited with code 1' not found 3 times in : \n%s\n", |
| 155 | debug) |
| 156 | }, 4*time.Minute, 2*time.Second) |
| 157 | |
| 158 | assert.Equal(t, strings.Count(res.Stdout(), "failing-1 | world"), 3, res.Combined()) |
| 159 | } |
| 160 | |
| 161 | func TestInitContainer(t *testing.T) { |
| 162 | c := NewParallelCLI(t) |
nothing calls this directly
no test coverage detected