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

Function TestNestedDotEnv

pkg/e2e/compose_test.go:370–390  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

368}
369
370func TestNestedDotEnv(t *testing.T) {
371 c := NewCLI(t)
372 defer c.cleanupWithDown(t, "nested")
373
374 cmd := c.NewDockerComposeCmd(t, "run", "echo")
375 cmd.Dir = filepath.Join(".", "fixtures", "nested")
376 res := icmd.RunCmd(cmd)
377 res.Assert(t, icmd.Expected{
378 ExitCode: 0,
379 Out: "root win=root",
380 })
381
382 cmd = c.NewDockerComposeCmd(t, "run", "echo")
383 cmd.Dir = filepath.Join(".", "fixtures", "nested", "sub")
384 defer c.cleanupWithDown(t, "nested")
385 res = icmd.RunCmd(cmd)
386 res.Assert(t, icmd.Expected{
387 ExitCode: 0,
388 Out: "root sub win=sub",
389 })
390}
391
392func TestUnnecessaryResources(t *testing.T) {
393 const projectName = "compose-e2e-unnecessary-resources"

Callers

nothing calls this directly

Calls 4

cleanupWithDownMethod · 0.95
NewDockerComposeCmdMethod · 0.95
NewCLIFunction · 0.85
RunCmdMethod · 0.80

Tested by

no test coverage detected