MCPcopy Create free account
hub / github.com/docker/compose / TestPauseServiceNotRunning

Function TestPauseServiceNotRunning

pkg/e2e/pause_test.go:74–90  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

72}
73
74func TestPauseServiceNotRunning(t *testing.T) {
75 cli := NewParallelCLI(t, WithEnv(
76 "COMPOSE_PROJECT_NAME=e2e-pause-svc-not-running",
77 "COMPOSE_FILE=./fixtures/pause/compose.yaml"))
78
79 cleanup := func() {
80 cli.RunDockerComposeCmd(t, "down", "-v", "--remove-orphans", "-t", "0")
81 }
82 cleanup()
83 t.Cleanup(cleanup)
84
85 // pause a and verify that it can no longer be hit but b still can
86 res := cli.RunDockerComposeCmdNoCheck(t, "pause", "a")
87
88 // TODO: `docker pause` errors in this case, should Compose be consistent?
89 res.Assert(t, icmd.Expected{ExitCode: 0})
90}
91
92func TestPauseServiceAlreadyPaused(t *testing.T) {
93 cli := NewParallelCLI(t, WithEnv(

Callers

nothing calls this directly

Calls 4

NewParallelCLIFunction · 0.85
WithEnvFunction · 0.85
RunDockerComposeCmdMethod · 0.80

Tested by

no test coverage detected