浏览代码

tests.e2e: Check Windows specific error

Signed-off-by: Chris Crone <[email protected]>
Chris Crone 5 年之前
父节点
当前提交
65fb6020a0
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5 1
      tests/e2e/e2e_test.go

+ 5 - 1
tests/e2e/e2e_test.go

@@ -315,10 +315,14 @@ func TestLegacy(t *testing.T) {
 
 	t.Run("host flag", func(t *testing.T) {
 		t.Parallel()
+		stderr := "Cannot connect to the Docker daemon at tcp://localhost:123"
+		if runtime.GOOS == "windows" {
+			stderr = "error during connect: Get http://localhost:123"
+		}
 		res := c.RunDockerCmd("-H", "tcp://localhost:123", "version")
 		res.Assert(t, icmd.Expected{
 			ExitCode: 1,
-			Err:      "Cannot connect to the Docker daemon at tcp://localhost:123",
+			Err:      stderr,
 		})
 	})