Skip to content

Commit 2c08ad2

Browse files
committed
Merge pull request #674 from estesp/use-docker-host-in-tests
Update all client instances in integration tests to use DOCKER_HOST
2 parents 4f2ad70 + f321eef commit 2c08ad2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/integration_test.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ def runTest(self):
242242
self.assertFalse(inspect_data['VolumesRW'][mount_dest])
243243

244244

245+
@unittest.skipIf(NOT_ON_HOST, 'Tests running inside a container; no syslog')
245246
class TestCreateContainerWithLogConfig(BaseTestCase):
246247
def runTest(self):
247248
config = docker.utils.LogConfig(
@@ -1386,7 +1387,7 @@ def runTest(self):
13861387

13871388
class TestAutoDetectVersion(unittest.TestCase):
13881389
def test_client_init(self):
1389-
client = docker.Client(version='auto')
1390+
client = docker.Client(base_url=DEFAULT_BASE_URL, version='auto')
13901391
client_version = client._version
13911392
api_version = client.version(api_version=False)['ApiVersion']
13921393
self.assertEqual(client_version, api_version)
@@ -1395,15 +1396,15 @@ def test_client_init(self):
13951396
client.close()
13961397

13971398
def test_auto_client(self):
1398-
client = docker.AutoVersionClient()
1399+
client = docker.AutoVersionClient(base_url=DEFAULT_BASE_URL)
13991400
client_version = client._version
14001401
api_version = client.version(api_version=False)['ApiVersion']
14011402
self.assertEqual(client_version, api_version)
14021403
api_version_2 = client.version()['ApiVersion']
14031404
self.assertEqual(client_version, api_version_2)
14041405
client.close()
14051406
with self.assertRaises(docker.errors.DockerException):
1406-
docker.AutoVersionClient(version='1.11')
1407+
docker.AutoVersionClient(base_url=DEFAULT_BASE_URL, version='1.11')
14071408

14081409

14091410
class TestConnectionTimeout(unittest.TestCase):

0 commit comments

Comments
 (0)