diff options
author | Joffrey F <joffrey@docker.com> | 2016-09-15 17:59:20 -0700 |
---|---|---|
committer | Joffrey F <joffrey@docker.com> | 2016-09-16 11:43:25 -0700 |
commit | 64517e31fce5293f58295c567bd5487e07b069f4 (patch) | |
tree | 0765f78765dc0dc9c5a8d7a62640e1452860dcac /tests/unit/cli/docker_client_test.py | |
parent | 651283eef96a6ab7854b3b8ee57bc25467f27f75 (diff) |
Force default host on windows to the default TCP host (instead of npipe)
Signed-off-by: Joffrey F <joffrey@docker.com>
Diffstat (limited to 'tests/unit/cli/docker_client_test.py')
-rw-r--r-- | tests/unit/cli/docker_client_test.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/unit/cli/docker_client_test.py b/tests/unit/cli/docker_client_test.py index aaa935af..6cdb7da5 100644 --- a/tests/unit/cli/docker_client_test.py +++ b/tests/unit/cli/docker_client_test.py @@ -60,6 +60,14 @@ class DockerClientTestCase(unittest.TestCase): ) self.assertEqual(client.headers['User-Agent'], expected) + @mock.patch.dict(os.environ) + def test_docker_client_default_windows_host(self): + with mock.patch('compose.cli.docker_client.IS_WINDOWS_PLATFORM', True): + if 'DOCKER_HOST' in os.environ: + del os.environ['DOCKER_HOST'] + client = docker_client(os.environ) + assert client.base_url == 'http://127.0.0.1:2375' + class TLSConfigTestCase(unittest.TestCase): ca_cert = 'tests/fixtures/tls/ca.pem' |