TestCliProxyDisableProxyUnixSock runs `docker info` by
clearing env however if the daemon is set up to run in a
different machine (e.g. Windows CI case) it does not make
use of DOCKER_TEST_HOST and tries to connect unix sock.
This fix injects DOCKER_HOST back to the test.
Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
| ... | ... |
@@ -9,7 +9,7 @@ import ( |
| 9 | 9 |
|
| 10 | 10 |
func TestCliProxyDisableProxyUnixSock(t *testing.T) {
|
| 11 | 11 |
cmd := exec.Command(dockerBinary, "info") |
| 12 |
- cmd.Env = []string{"HTTP_PROXY=http://127.0.0.1:9999"}
|
|
| 12 |
+ cmd.Env = appendDockerHostEnv([]string{"HTTP_PROXY=http://127.0.0.1:9999"})
|
|
| 13 | 13 |
|
| 14 | 14 |
if out, _, err := runCommandWithOutput(cmd); err != nil {
|
| 15 | 15 |
t.Fatal(err, out) |