ansible-test - allow for the same listening port on multiple interfaces (#75387)

pull/75253/head
Sam Doran 3 years ago committed by GitHub
parent c8d413164d
commit 1d2af0b89e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,2 @@
bugfixes:
- ansible-test - allow the same listening port on all container interfaces

@ -524,7 +524,7 @@ class ContainerDescriptor:
# inspect the support container to locate the published ports
tcp_ports = dict((port, container.get_tcp_port(port)) for port in self.ports)
if any(not config or len(config) != 1 for config in tcp_ports.values()):
if any(not config or len(set(conf['HostPort'] for conf in config)) != 1 for config in tcp_ports.values()):
raise ApplicationError('Unexpected `docker inspect` results for published TCP ports:\n%s' % json.dumps(tcp_ports, indent=4, sort_keys=True))
published_ports = dict((port, int(config[0]['HostPort'])) for port, config in tcp_ports.items())

Loading…
Cancel
Save