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

Function TestPauseServiceDoesNotExist

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

Source from the content-addressed store, hash-verified

111}
112
113func TestPauseServiceDoesNotExist(t *testing.T) {
114 cli := NewParallelCLI(t, WithEnv(
115 "COMPOSE_PROJECT_NAME=e2e-pause-svc-not-exist",
116 "COMPOSE_FILE=./fixtures/pause/compose.yaml"))
117
118 cleanup := func() {
119 cli.RunDockerComposeCmd(t, "down", "-v", "--remove-orphans", "-t", "0")
120 }
121 cleanup()
122 t.Cleanup(cleanup)
123
124 // pause a and verify that it can no longer be hit but b still can
125 res := cli.RunDockerComposeCmdNoCheck(t, "pause", "does_not_exist")
126 // TODO: `compose down does_not_exist` and similar error, this should too
127 res.Assert(t, icmd.Expected{ExitCode: 0})
128}
129
130func urlForService(t testing.TB, cli *CLI, service string, targetPort int) string {
131 t.Helper()

Callers

nothing calls this directly

Calls 4

NewParallelCLIFunction · 0.85
WithEnvFunction · 0.85
RunDockerComposeCmdMethod · 0.80

Tested by

no test coverage detected