mirror of https://github.com/docker/compose.git
Fix networking tests to work with new API in engine rc4 (https://github.com/docker/docker/pull/17536)
Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
parent
77e1fe1915
commit
1b5b407619
|
@ -215,17 +215,17 @@ class CLITestCase(DockerClientTestCase):
|
|||
|
||||
networks = client.networks(names=[self.project.name])
|
||||
for n in networks:
|
||||
self.addCleanup(client.remove_network, n['id'])
|
||||
self.addCleanup(client.remove_network, n['Id'])
|
||||
self.assertEqual(len(networks), 1)
|
||||
self.assertEqual(networks[0]['driver'], 'bridge')
|
||||
self.assertEqual(networks[0]['Driver'], 'bridge')
|
||||
|
||||
network = client.inspect_network(networks[0]['id'])
|
||||
self.assertEqual(len(network['containers']), len(services))
|
||||
network = client.inspect_network(networks[0]['Id'])
|
||||
self.assertEqual(len(network['Containers']), len(services))
|
||||
|
||||
for service in services:
|
||||
containers = service.containers()
|
||||
self.assertEqual(len(containers), 1)
|
||||
self.assertIn(containers[0].id, network['containers'])
|
||||
self.assertIn(containers[0].id, network['Containers'])
|
||||
self.assertEqual(containers[0].get('Config.Hostname'), service.name)
|
||||
|
||||
web_container = self.project.get_service('web').containers()[0]
|
||||
|
@ -518,7 +518,7 @@ class CLITestCase(DockerClientTestCase):
|
|||
container, = service.containers(stopped=True, one_off=True)
|
||||
networks = client.networks(names=[self.project.name])
|
||||
for n in networks:
|
||||
self.addCleanup(client.remove_network, n['id'])
|
||||
self.addCleanup(client.remove_network, n['Id'])
|
||||
self.assertEqual(len(networks), 1)
|
||||
self.assertEqual(container.human_readable_command, u'true')
|
||||
|
||||
|
|
|
@ -111,7 +111,7 @@ class ProjectTest(DockerClientTestCase):
|
|||
network_name = 'network_does_exist'
|
||||
project = Project(network_name, [], client)
|
||||
client.create_network(network_name)
|
||||
assert project.get_network()['name'] == network_name
|
||||
assert project.get_network()['Name'] == network_name
|
||||
|
||||
def test_net_from_service(self):
|
||||
project = Project.from_dicts(
|
||||
|
|
Loading…
Reference in New Issue