mirror of
https://github.com/docker/compose.git
synced 2025-07-24 14:14:35 +02:00
Don't share the compose file with ACI
ACI doesn't support service labels, we need to split Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
This commit is contained in:
parent
15040f8473
commit
7a841b98da
@ -49,15 +49,8 @@ func TestLocalComposeUp(t *testing.T) {
|
|||||||
|
|
||||||
const projectName = "compose-e2e-demo"
|
const projectName = "compose-e2e-demo"
|
||||||
|
|
||||||
t.Run("build", func(t *testing.T) {
|
|
||||||
res := c.RunDockerCmd("compose", "build", "-f", "../composefiles/demo_multi_port.yaml")
|
|
||||||
res.Assert(t, icmd.Expected{Out: "COPY words.sql /docker-entrypoint-initdb.d/"})
|
|
||||||
res.Assert(t, icmd.Expected{Out: "COPY pom.xml ."})
|
|
||||||
res.Assert(t, icmd.Expected{Out: "COPY static /static/"})
|
|
||||||
})
|
|
||||||
|
|
||||||
t.Run("up", func(t *testing.T) {
|
t.Run("up", func(t *testing.T) {
|
||||||
c.RunDockerCmd("compose", "up", "-d", "-f", "../composefiles/demo_multi_port.yaml", "--project-name", projectName, "-d")
|
c.RunDockerCmd("compose", "up", "-d", "-f", "./fixtures/sentences/docker-compose.yaml", "--project-name", projectName, "-d")
|
||||||
})
|
})
|
||||||
|
|
||||||
t.Run("check running project", func(t *testing.T) {
|
t.Run("check running project", func(t *testing.T) {
|
||||||
@ -78,7 +71,7 @@ func TestLocalComposeUp(t *testing.T) {
|
|||||||
res.Assert(t, icmd.Expected{Out: `"com.docker.compose.project": "compose-e2e-demo"`})
|
res.Assert(t, icmd.Expected{Out: `"com.docker.compose.project": "compose-e2e-demo"`})
|
||||||
res.Assert(t, icmd.Expected{Out: `"com.docker.compose.oneoff": "False",`})
|
res.Assert(t, icmd.Expected{Out: `"com.docker.compose.oneoff": "False",`})
|
||||||
res.Assert(t, icmd.Expected{Out: `"com.docker.compose.config-hash":`})
|
res.Assert(t, icmd.Expected{Out: `"com.docker.compose.config-hash":`})
|
||||||
res.Assert(t, icmd.Expected{Out: `"com.docker.compose.project.config_files": "../composefiles/demo_multi_port.yaml"`})
|
res.Assert(t, icmd.Expected{Out: `"com.docker.compose.project.config_files": "./fixtures/sentences/docker-compose.yaml"`})
|
||||||
res.Assert(t, icmd.Expected{Out: `"com.docker.compose.project.working_dir":`})
|
res.Assert(t, icmd.Expected{Out: `"com.docker.compose.project.working_dir":`})
|
||||||
res.Assert(t, icmd.Expected{Out: `"com.docker.compose.service": "web"`})
|
res.Assert(t, icmd.Expected{Out: `"com.docker.compose.service": "web"`})
|
||||||
res.Assert(t, icmd.Expected{Out: `"com.docker.compose.version":`})
|
res.Assert(t, icmd.Expected{Out: `"com.docker.compose.version":`})
|
||||||
@ -119,7 +112,7 @@ func TestLocalComposeVolume(t *testing.T) {
|
|||||||
//ensure local test run does not reuse previously build image
|
//ensure local test run does not reuse previously build image
|
||||||
c.RunDockerOrExitError("rmi", "compose-e2e-volume_nginx")
|
c.RunDockerOrExitError("rmi", "compose-e2e-volume_nginx")
|
||||||
c.RunDockerOrExitError("volume", "rm", projectName+"_staticVol")
|
c.RunDockerOrExitError("volume", "rm", projectName+"_staticVol")
|
||||||
c.RunDockerCmd("compose", "up", "-d", "--workdir", "volume-test", "--project-name", projectName)
|
c.RunDockerCmd("compose", "up", "-d", "--workdir", "fixtures/volume-test", "--project-name", projectName)
|
||||||
})
|
})
|
||||||
|
|
||||||
t.Run("access bind mount data", func(t *testing.T) {
|
t.Run("access bind mount data", func(t *testing.T) {
|
||||||
|
13
tests/compose-e2e/fixtures/sentences/docker-compose.yaml
Normal file
13
tests/compose-e2e/fixtures/sentences/docker-compose.yaml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
services:
|
||||||
|
db:
|
||||||
|
image: gtardif/sentences-db
|
||||||
|
words:
|
||||||
|
image: gtardif/sentences-api
|
||||||
|
ports:
|
||||||
|
- "8080:8080"
|
||||||
|
web:
|
||||||
|
image: gtardif/sentences-web
|
||||||
|
ports:
|
||||||
|
- "80:80"
|
||||||
|
labels:
|
||||||
|
- "my-label=test"
|
@ -13,5 +13,3 @@ services:
|
|||||||
image: gtardif/sentences-web
|
image: gtardif/sentences-web
|
||||||
ports:
|
ports:
|
||||||
- "80:80"
|
- "80:80"
|
||||||
labels:
|
|
||||||
- "my-label=test"
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user