Forráskód Böngészése

e2e compose run --env

Signed-off-by: Nicolas De Loof <[email protected]>
Nicolas De Loof 5 hónapja
szülő
commit
b6a0df8d3c

+ 6 - 0
pkg/e2e/compose_run_test.go

@@ -210,4 +210,10 @@ func TestLocalComposeRun(t *testing.T) {
 		res = c.RunDockerCmd(t, "ps", "--all", "--filter", "name=run-test-nginx", "--format", "'{{.Names}}'")
 		assert.Assert(t, !strings.Contains(res.Stdout(), "run-test-nginx"), res.Stdout())
 	})
+
+	t.Run("compose run --env", func(t *testing.T) {
+		res := c.RunDockerComposeCmd(t, "-f", "./fixtures/run-test/compose.yaml", "run", "--env", "FOO=BAR",
+			"front", "env")
+		res.Assert(t, icmd.Expected{Out: "FOO=BAR"})
+	})
 }

+ 0 - 1
pkg/e2e/fixtures/run-test/deps.yaml

@@ -1,4 +1,3 @@
-version: "3.6"
 services:
   service_a:
     image: bash

+ 0 - 1
pkg/e2e/fixtures/run-test/orphan.yaml

@@ -1,4 +1,3 @@
-version: '3.8'
 services:
   simple:
     image: alpine

+ 0 - 1
pkg/e2e/fixtures/run-test/ports.yaml

@@ -1,4 +1,3 @@
-version: '3.8'
 services:
   back:
     image: alpine