Kaydet (Commit) 1132368b authored tarafından Joffrey F's avatar Joffrey F

Fix network aliases test with Engine 1.12

Signed-off-by: 's avatarJoffrey F <joffrey@docker.com>
üst 54804936
......@@ -138,9 +138,11 @@ class TestNetworks(helpers.BaseTestCase):
self.client.connect_container_to_network(
container, net_id, aliases=['foo', 'bar'])
container_data = self.client.inspect_container(container)
self.assertEqual(
container_data['NetworkSettings']['Networks'][net_name]['Aliases'],
['foo', 'bar'])
aliases = (
container_data['NetworkSettings']['Networks'][net_name]['Aliases']
)
assert 'foo' in aliases
assert 'bar' in aliases
@requires_api_version('1.21')
def test_connect_on_container_create(self):
......@@ -183,10 +185,11 @@ class TestNetworks(helpers.BaseTestCase):
self.client.start(container)
container_data = self.client.inspect_container(container)
self.assertEqual(
container_data['NetworkSettings']['Networks'][net_name]['Aliases'],
['foo', 'bar']
aliases = (
container_data['NetworkSettings']['Networks'][net_name]['Aliases']
)
assert 'foo' in aliases
assert 'bar' in aliases
@requires_api_version('1.22')
def test_create_with_ipv4_address(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment