mirror of
https://github.com/docker/compose.git
synced 2025-07-23 13:45:00 +02:00
e2e: reproduce bug with links
Signed-off-by: Nick Sieger <nick@nicksieger.com>
This commit is contained in:
parent
cacff89cef
commit
28c0fbfdc0
8
pkg/e2e/fixtures/links/compose.yaml
Normal file
8
pkg/e2e/fixtures/links/compose.yaml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
services:
|
||||||
|
foo:
|
||||||
|
image: nginx:alpine
|
||||||
|
links:
|
||||||
|
- bar
|
||||||
|
|
||||||
|
bar:
|
||||||
|
image: nginx:alpine
|
@ -131,10 +131,11 @@ func TestStartStopWithDependencies(t *testing.T) {
|
|||||||
assert.Assert(t, strings.Contains(res.Combined(), "e2e-start-stop-with-dependencies-foo-1"), res.Combined())
|
assert.Assert(t, strings.Contains(res.Combined(), "e2e-start-stop-with-dependencies-foo-1"), res.Combined())
|
||||||
})
|
})
|
||||||
|
|
||||||
t.Run("Up no-deps", func(t *testing.T) {
|
t.Run("Up no-deps links", func(t *testing.T) {
|
||||||
_ = c.RunDockerComposeCmd("--project-name", projectName, "down")
|
_ = c.RunDockerComposeCmd("--project-name", projectName, "down")
|
||||||
res := c.RunDockerComposeCmd("-f", "./fixtures/dependencies/compose.yaml", "--project-name", projectName, "up", "--no-deps", "-d", "foo")
|
res := c.RunDockerComposeCmd("-f", "./fixtures/links/compose.yaml", "--project-name", projectName, "up", "--no-deps", "-d", "foo")
|
||||||
assert.Assert(t, strings.Contains(res.Combined(), "Container e2e-start-stop-with-dependencies-foo-1 Started"), res.Combined())
|
assert.Assert(t, strings.Contains(res.Combined(), "Container e2e-start-stop-with-dependencies-foo-1 Started"), res.Combined())
|
||||||
|
assert.Assert(t, !strings.Contains(res.Combined(), "Container e2e-start-stop-with-dependencies-bar-1 Started"), res.Combined())
|
||||||
})
|
})
|
||||||
|
|
||||||
t.Run("down", func(t *testing.T) {
|
t.Run("down", func(t *testing.T) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user