From 28c0fbfdc0944e13b6d47c4c85f376fb8ae5ae89 Mon Sep 17 00:00:00 2001 From: Nick Sieger Date: Tue, 31 May 2022 16:32:29 -0500 Subject: [PATCH] e2e: reproduce bug with links Signed-off-by: Nick Sieger --- pkg/e2e/fixtures/links/compose.yaml | 8 ++++++++ pkg/e2e/start_stop_test.go | 5 +++-- 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 pkg/e2e/fixtures/links/compose.yaml diff --git a/pkg/e2e/fixtures/links/compose.yaml b/pkg/e2e/fixtures/links/compose.yaml new file mode 100644 index 000000000..8c182c4d2 --- /dev/null +++ b/pkg/e2e/fixtures/links/compose.yaml @@ -0,0 +1,8 @@ +services: + foo: + image: nginx:alpine + links: + - bar + + bar: + image: nginx:alpine diff --git a/pkg/e2e/start_stop_test.go b/pkg/e2e/start_stop_test.go index f1ea41c34..f649112a2 100644 --- a/pkg/e2e/start_stop_test.go +++ b/pkg/e2e/start_stop_test.go @@ -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()) }) - 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") - 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-bar-1 Started"), res.Combined()) }) t.Run("down", func(t *testing.T) {