Merge pull request #447 from docker/e2e-windows-host

Check Windows specific host error in e2e tests
This commit is contained in:
Chris Crone 2020-08-10 15:12:45 +02:00 committed by GitHub
commit 928e5ab017
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -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,
})
})