(t *testing.T)
| 190 | } |
| 191 | |
| 192 | func TestEnvInterpolation(t *testing.T) { |
| 193 | c := NewParallelCLI(t) |
| 194 | |
| 195 | t.Run("shell priority from run command", func(t *testing.T) { |
| 196 | cmd := c.NewDockerComposeCmd(t, "-f", "./fixtures/environment/env-interpolation/compose.yaml", "config") |
| 197 | cmd.Env = append(cmd.Env, "WHEREAMI=shell") |
| 198 | res := icmd.RunCmd(cmd) |
| 199 | res.Assert(t, icmd.Expected{Out: `IMAGE: default_env:shell`}) |
| 200 | }) |
| 201 | |
| 202 | t.Run("shell priority from run command using default value fallback", func(t *testing.T) { |
| 203 | c.RunDockerComposeCmd(t, "-f", "./fixtures/environment/env-interpolation-default-value/compose.yaml", "config"). |
| 204 | Assert(t, icmd.Expected{Out: `IMAGE: default_env:EnvFileDefaultValue`}) |
| 205 | }) |
| 206 | } |
| 207 | |
| 208 | func TestCommentsInEnvFile(t *testing.T) { |
| 209 | c := NewParallelCLI(t) |
nothing calls this directly
no test coverage detected