(t *testing.T)
| 90 | } |
| 91 | |
| 92 | func TestPauseServiceAlreadyPaused(t *testing.T) { |
| 93 | cli := NewParallelCLI(t, WithEnv( |
| 94 | "COMPOSE_PROJECT_NAME=e2e-pause-svc-already-paused", |
| 95 | "COMPOSE_FILE=./fixtures/pause/compose.yaml")) |
| 96 | |
| 97 | cleanup := func() { |
| 98 | cli.RunDockerComposeCmd(t, "down", "-v", "--remove-orphans", "-t", "0") |
| 99 | } |
| 100 | cleanup() |
| 101 | t.Cleanup(cleanup) |
| 102 | |
| 103 | // launch a and wait for it to come up |
| 104 | cli.RunDockerComposeCmd(t, "up", "--menu=false", "--wait", "a") |
| 105 | HTTPGetWithRetry(t, urlForService(t, cli, "a", 80), http.StatusOK, 50*time.Millisecond, 10*time.Second) |
| 106 | |
| 107 | // pause a twice - first time should pass, second time fail |
| 108 | cli.RunDockerComposeCmd(t, "pause", "a") |
| 109 | res := cli.RunDockerComposeCmdNoCheck(t, "pause", "a") |
| 110 | res.Assert(t, icmd.Expected{ExitCode: 1, Err: "already paused"}) |
| 111 | } |
| 112 | |
| 113 | func TestPauseServiceDoesNotExist(t *testing.T) { |
| 114 | cli := NewParallelCLI(t, WithEnv( |
nothing calls this directly
no test coverage detected