浏览代码

integ-cli: skip test assuming -H is unix://...

`TestCliProxyDisableProxyUnixSock` verifies that HTTP_PROXY env var is
used when DOCKER_HOST is not set and cli connects to `unix://...` by
default.

In the windows/darwin CLI CIs, daemon is on remote host and we always
connect via `tcp://`, therefore this test fails very straight. Skipping
this test to run only on "same host daemon" assumption.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
Ahmet Alp Balkan 10 年之前
父节点
当前提交
f6f2bad7ea
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      integration-cli/docker_cli_proxy_test.go

+ 2 - 0
integration-cli/docker_cli_proxy_test.go

@@ -8,6 +8,8 @@ import (
 )
 )
 
 
 func TestCliProxyDisableProxyUnixSock(t *testing.T) {
 func TestCliProxyDisableProxyUnixSock(t *testing.T) {
+	testRequires(t, SameHostDaemon) // test is valid when DOCKER_HOST=unix://..
+
 	cmd := exec.Command(dockerBinary, "info")
 	cmd := exec.Command(dockerBinary, "info")
 	cmd.Env = appendDockerHostEnv([]string{"HTTP_PROXY=http://127.0.0.1:9999"})
 	cmd.Env = appendDockerHostEnv([]string{"HTTP_PROXY=http://127.0.0.1:9999"})