MCPcopy
hub / github.com/docker/compose / TestCommentsInEnvFile

Function TestCommentsInEnvFile

pkg/e2e/compose_environment_test.go:208–224  ·  pkg/e2e/compose_environment_test.go::TestCommentsInEnvFile
(t *testing.T)

Source from the content-addressed store, hash-verified

206}
207
208func TestCommentsInEnvFile(t *testing.T) {
209 c := NewParallelCLI(t)
210
211 t.Run("comments in env files", func(t *testing.T) {
212 c.RunDockerOrExitError(t, "rmi", "env-file-comments")
213
214 c.RunDockerComposeCmd(t, "-f", "./fixtures/environment/env-file-comments/compose.yaml", "up", "-d", "--build")
215
216 res := c.RunDockerComposeCmd(t, "-f", "./fixtures/environment/env-file-comments/compose.yaml",
217 "run", "--rm", "-e", "COMMENT", "-e", "NO_COMMENT", "env-file-comments")
218
219 res.Assert(t, icmd.Expected{Out: `COMMENT=1234`})
220 res.Assert(t, icmd.Expected{Out: `NO_COMMENT=1234#5`})
221
222 c.RunDockerComposeCmd(t, "--project-name", "env-file-comments", "down", "--rmi", "all")
223 })
224}
225
226func TestUnsetEnv(t *testing.T) {
227 c := NewParallelCLI(t)

Callers

nothing calls this directly

Calls 3

NewParallelCLIFunction · 0.85
RunDockerOrExitErrorMethod · 0.80
RunDockerComposeCmdMethod · 0.80

Tested by

no test coverage detected