Miscellaneous test fixes

Signed-off-by: Joffrey F <joffrey@docker.com>
This commit is contained in:
Joffrey F 2017-11-01 14:26:29 -07:00
parent 6078736604
commit 9f80ec548e
2 changed files with 8 additions and 2 deletions

View File

@ -851,7 +851,13 @@ class CLITestCase(DockerClientTestCase):
volumes = self.project.volumes.volumes volumes = self.project.volumes.volumes
assert 'data' in volumes assert 'data' in volumes
volume = volumes['data'] volume = volumes['data']
assert volume.exists()
# The code below is a Swarm-compatible equivalent to volume.exists()
remote_volumes = [
v for v in self.client.volumes().get('Volumes', [])
if v['Name'].split('/')[-1] == volume.full_name
]
assert len(remote_volumes) > 0
@v2_only() @v2_only()
def test_up_no_ansi(self): def test_up_no_ansi(self):

View File

@ -788,7 +788,7 @@ class ServiceTest(DockerClientTestCase):
net_container = self.client.create_container( net_container = self.client.create_container(
'busybox', 'top', host_config=self.client.create_host_config( 'busybox', 'top', host_config=self.client.create_host_config(
extra_hosts={'google.local': '8.8.8.8'} extra_hosts={'google.local': '127.0.0.1'}
), name='composetest_build_network' ), name='composetest_build_network'
) )