Răsfoiți Sursa

e2e: reproduce bug with links

Signed-off-by: Nick Sieger <[email protected]>
Nick Sieger 3 ani în urmă
părinte
comite
28c0fbfdc0
2 a modificat fișierele cu 11 adăugiri și 2 ștergeri
  1. 8 0
      pkg/e2e/fixtures/links/compose.yaml
  2. 3 2
      pkg/e2e/start_stop_test.go

+ 8 - 0
pkg/e2e/fixtures/links/compose.yaml

@@ -0,0 +1,8 @@
+services:
+  foo:
+    image: nginx:alpine
+    links:
+      - bar
+
+  bar:
+    image: nginx:alpine

+ 3 - 2
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) {