(t *testing.T)
| 224 | } |
| 225 | |
| 226 | func TestUnsetEnv(t *testing.T) { |
| 227 | c := NewParallelCLI(t) |
| 228 | t.Cleanup(func() { |
| 229 | c.RunDockerComposeCmd(t, "--project-name", "empty-variable", "down", "--rmi", "all") |
| 230 | }) |
| 231 | |
| 232 | t.Run("override env variable", func(t *testing.T) { |
| 233 | c.RunDockerComposeCmd(t, "-f", "./fixtures/environment/empty-variable/compose.yaml", "build") |
| 234 | |
| 235 | res := c.RunDockerComposeCmd(t, "-f", "./fixtures/environment/empty-variable/compose.yaml", |
| 236 | "run", "-e", "EMPTY=hello", "--rm", "empty-variable") |
| 237 | res.Assert(t, icmd.Expected{Out: `=hello=`}) |
| 238 | }) |
| 239 | |
| 240 | t.Run("unset env variable", func(t *testing.T) { |
| 241 | res := c.RunDockerComposeCmd(t, "-f", "./fixtures/environment/empty-variable/compose.yaml", |
| 242 | "run", "--rm", "empty-variable") |
| 243 | res.Assert(t, icmd.Expected{Out: `==`}) |
| 244 | }) |
| 245 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…