Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

integration-cli: use remote daemon env var in TestCliProxyDisableProxyUnixSock #10796

Merged
merged 1 commit into from
Feb 16, 2015
Merged

integration-cli: use remote daemon env var in TestCliProxyDisableProxyUnixSock #10796

merged 1 commit into from
Feb 16, 2015

Conversation

ahmetb
Copy link
Contributor

@ahmetb ahmetb commented Feb 14, 2015

TestCliProxyDisableProxyUnixSock execs 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
Label: #windows
cc: @cpuguy83 @unclejack @tianon @jfrazelle

@@ -10,6 +10,9 @@ import (
func TestCliProxyDisableProxyUnixSock(t *testing.T) {
cmd := exec.Command(dockerBinary, "info")
cmd.Env = []string{"HTTP_PROXY=http://127.0.0.1:9999"}
if testHost := os.Getenv("DOCKER_TEST_HOST"); testHost != "" { // preserve remote test daemon addr
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should just be passing DOCKER_HOST along directly. See #10797 where I've fixed the other instance of this. 👍

@tianon
Copy link
Member

tianon commented Feb 14, 2015

LGTM! ❤️

(doh me: #10747 (comment))

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>
@ahmetb
Copy link
Contributor Author

ahmetb commented Feb 16, 2015

Made use of #10800 and updated PR with appendDockerHostEnv

@crosbymichael
Copy link
Contributor

LGTM

1 similar comment
@jessfraz
Copy link
Contributor

LGTM

jessfraz pushed a commit that referenced this pull request Feb 16, 2015
…ableProxyUnixSock-fix

integration-cli: use remote daemon env var in TestCliProxyDisableProxyUnixSock
@jessfraz jessfraz merged commit 39df847 into moby:master Feb 16, 2015
@ahmetb ahmetb deleted the win-cli/TestCliProxyDisableProxyUnixSock-fix branch February 16, 2015 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants