Add integration test for network scoped aliases

Signed-off-by: Songmin Li <lisongmin@protonmail.com>
This commit is contained in:
Songmin Li
2024-12-18 19:59:35 +02:00
committed by Povilas Kanapickas
parent 978a1381bc
commit 55642247e3
3 changed files with 119 additions and 2 deletions

View File

@ -983,9 +983,9 @@ def get_net_args_from_networks(compose, cnt):
ipv4 = net_config_.get("ipv4_address")
ipv6 = net_config_.get("ipv6_address")
# custom extension; not supported by docker-compose v3
mac = net_config_.get("x-podman.mac_address")
aliases_on_net = net_config_.get("aliases")
aliases_on_net = norm_as_list(net_config_.get("aliases", []))
# if a mac_address was specified on the container level, apply it to the first network
# This works for Python > 3.6, because dict insert ordering is preserved, so we are