Skip to content

Commit 3230d2c

Browse files
author
Lukasz Osipiuk
committed
Fix product tests to support boot2docker
1 parent a0f9ec3 commit 3230d2c

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

tests/docker_cluster.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828

2929
from docker import Client
3030
from docker.errors import APIError
31+
from docker.utils.utils import kwargs_from_env
3132
from nose.tools import nottest
3233

3334
from prestoadmin import main_dir
@@ -60,7 +61,12 @@ def __init__(self, master_host, slave_hosts,
6061
# container mount point call get_local_mount_dir()
6162
self.local_mount_dir = local_mount_dir
6263
self.mount_dir = docker_mount_dir
63-
self.client = Client(timeout=240)
64+
65+
kwargs = kwargs_from_env()
66+
kwargs['tls'].assert_hostname = False
67+
kwargs['timeout'] = 240
68+
self.client = Client(**kwargs)
69+
6470
self._DOCKER_START_TIMEOUT = 30
6571
DockerCluster.__check_if_docker_exists()
6672

tox.ini

+1
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ setenv =
77
commands = nosetests {posargs}
88
deps =
99
-r{toxinidir}/requirements.txt
10+
passenv = DOCKER_HOST DOCKER_TLS_VERIFY DOCKER_CERT_PATH

0 commit comments

Comments
 (0)