Преглед изворни кода

add test for compose ls

Signed-off-by: aiordache <[email protected]>
aiordache пре 5 година
родитељ
комит
19a707495f
1 измењених фајлова са 11 додато и 0 уклоњено
  1. 11 0
      tests/ecs-e2e/e2e-ecs_test.go

+ 11 - 0
tests/ecs-e2e/e2e-ecs_test.go

@@ -98,6 +98,17 @@ func TestCompose(t *testing.T) {
 		url = "http://" + strings.Replace(fields[3], "->80/http", "", 1)
 	})
 
+	t.Run("compose ls", func(t *testing.T) {
+		res := c.RunDockerCmd("compose", "ls", "--project-name", stack)
+		lines := strings.Split(res.Stdout(), "\n")
+
+		assert.Equal(t, 2, len(lines))
+		fields := strings.Fields(lines[1])
+		assert.Equal(t, 2, len(fields))
+		assert.Check(t, strings.Contains(fields[0], stack))
+		assert.Equal(t, "Running", fields[1])
+	})
+
 	t.Run("nginx GET", func(t *testing.T) {
 		checkUp := func(t poll.LogT) poll.Result {
 			r, err := http.Get(url)