From 5865f546ec55d2cc15b3b88e801d7cca724034a2 Mon Sep 17 00:00:00 2001 From: Andreas Perhab Date: Sat, 15 Nov 2025 10:18:30 +0100 Subject: [PATCH] tests: fix _get_container_ip for docker 29.0 (#4606) --- CHANGELOG.md | 2 ++ test/helper/common.bash | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 83473544..0324cd03 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ All notable changes to this project will be documented in this file. The format - **Internal:** - `ENABLE_QUOTAS=1` - When an alias has multiple addresses, the first local mailbox address found will be used for the Dovecot dummy account workaround ([#4581](https://github.com/docker-mailserver/docker-mailserver/pull/4581)) +- **Tests:** + - Make the helper method `_get_container_ip()` compatible with Docker 29 ([#4606](https://github.com/docker-mailserver/docker-mailserver/pull/4606)) ### Removed diff --git a/test/helper/common.bash b/test/helper/common.bash index 4e4ddf6a..97640d2e 100644 --- a/test/helper/common.bash +++ b/test/helper/common.bash @@ -364,11 +364,12 @@ function _reload_postfix() { } # Get the IP of the container (${1}). +# This uses the "bridge" network IPAddress and doesn't consider other docker networks. # # @param ${1} = container name [OPTIONAL] function _get_container_ip() { local TARGET_CONTAINER_NAME=$(__handle_container_name "${1:-}") - docker inspect --format '{{ .NetworkSettings.IPAddress }}' "${TARGET_CONTAINER_NAME}" + docker inspect --format '{{ .NetworkSettings.Networks.bridge.IPAddress }}' "${TARGET_CONTAINER_NAME}" } # Check if a container is running.