(t *testing.T)
| 195 | } |
| 196 | |
| 197 | func TestStopAlreadyStopped(t *testing.T) { |
| 198 | cli := NewParallelCLI(t, WithEnv( |
| 199 | "COMPOSE_PROJECT_NAME=e2e-start-stop-svc-already-stopped", |
| 200 | "COMPOSE_FILE=./fixtures/start-stop/compose.yaml")) |
| 201 | t.Cleanup(func() { |
| 202 | cli.RunDockerComposeCmd(t, "down", "--remove-orphans", "-v", "-t", "0") |
| 203 | }) |
| 204 | |
| 205 | cli.RunDockerComposeCmd(t, "up", "-d", "--wait") |
| 206 | |
| 207 | // stop the container |
| 208 | cli.RunDockerComposeCmd(t, "stop", "simple") |
| 209 | |
| 210 | // attempt to stop it again |
| 211 | res := cli.RunDockerComposeCmdNoCheck(t, "stop", "simple") |
| 212 | // TODO: for consistency, this should NOT write any output because the |
| 213 | // container is already stopped |
| 214 | res.Assert(t, icmd.Expected{ |
| 215 | ExitCode: 0, |
| 216 | Err: "Container e2e-start-stop-svc-already-stopped-simple-1 Stopped", |
| 217 | }) |
| 218 | } |
| 219 | |
| 220 | func TestStartStopMultipleServices(t *testing.T) { |
| 221 | cli := NewParallelCLI(t, WithEnv( |
nothing calls this directly
no test coverage detected