Skip to content

Commit

Permalink
no DNSNames for you!
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
  • Loading branch information
thaJeztah committed May 22, 2024
1 parent 4336c23 commit 2722873
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions tests/integration/models_containers_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,9 @@ def test_run_with_networking_config(self):
assert 'NetworkSettings' in attrs
assert 'Networks' in attrs['NetworkSettings']
assert list(attrs['NetworkSettings']['Networks'].keys()) == [net_name]
# Aliases no longer include the container's short-id in API v1.45,
# and aliases are now included in DNSNames.
# Aliases no longer include the container's short-id in API v1.45.
assert attrs['NetworkSettings']['Networks'][net_name]['Aliases'] \
== [test_alias]
assert attrs['NetworkSettings']['Networks'][net_name]['DNSNames'] \
== [test_alias, attrs['Id'][:12]]
assert attrs['NetworkSettings']['Networks'][net_name]['DriverOpts'] \
== test_driver_opt

Expand Down Expand Up @@ -174,11 +171,9 @@ def test_run_with_networking_config_only_undeclared_network(self):
client.networks.create(net_name)
self.tmp_networks.append(net_name)

test_alias = 'hello'

networking_config = {
'bar': client.api.create_endpoint_config(
aliases=[test_alias],
aliases=['hello'],
driver_opt={'key1': 'a'}
),
}
Expand All @@ -195,8 +190,7 @@ def test_run_with_networking_config_only_undeclared_network(self):
assert 'NetworkSettings' in attrs
assert 'Networks' in attrs['NetworkSettings']
assert list(attrs['NetworkSettings']['Networks'].keys()) == [net_name]
# Aliases no longer include the container's short-id in API v1.45,
# and aliases are now included in DNSNames.
# Aliases no longer include the container's short-id in API v1.45.
assert (attrs['NetworkSettings']['Networks'][net_name]['Aliases']
is None)
assert (attrs['NetworkSettings']['Networks'][net_name]['DriverOpts']
Expand Down

0 comments on commit 2722873

Please sign in to comment.