From cef97f78f12aa5c1aae36407dcaea786c05dfa34 Mon Sep 17 00:00:00 2001 From: Florent Daigniere Date: Sat, 11 Mar 2023 11:58:51 +0100 Subject: [PATCH] Maybe fix the tests --- tests/compose/webmail/01_ensure_admin_unreachable.sh | 2 +- tests/compose/webmail/docker-compose.yml | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/compose/webmail/01_ensure_admin_unreachable.sh b/tests/compose/webmail/01_ensure_admin_unreachable.sh index 4fd78a1b..1d8a467e 100755 --- a/tests/compose/webmail/01_ensure_admin_unreachable.sh +++ b/tests/compose/webmail/01_ensure_admin_unreachable.sh @@ -1,6 +1,6 @@ #!/bin/bash -IP="$(docker inspect webmail_webmail_1|jq -r '.[0].NetworkSettings.Networks.webmail_default.IPAddress')" +IP="$(docker inspect webmail-webmail-1|jq -r '.[0].NetworkSettings.Networks.webmail_webmail.IPAddress')" MAIN_RETURN_CODE=$(curl -I -so /dev/null -w "%{http_code}" http://$IP/) [[ $MAIN_RETURN_CODE -ne 200 && $MAIN_RETURN_CODE -ne 302 ]] && echo "The default page of snappymail hasn't returned 200 but $MAIN_RETURN_CODE!" >>/dev/stderr && exit 1 diff --git a/tests/compose/webmail/docker-compose.yml b/tests/compose/webmail/docker-compose.yml index 5e106105..d61621d3 100644 --- a/tests/compose/webmail/docker-compose.yml +++ b/tests/compose/webmail/docker-compose.yml @@ -32,6 +32,9 @@ services: - "127.0.0.1:993:993" volumes: - "/mailu/certs:/certs" + networks: + - default + - webmail admin: image: ${DOCKER_ORG:-mailu}/${DOCKER_PREFIX:-}admin:${MAILU_VERSION:-local} @@ -105,6 +108,8 @@ services: - "/mailu/webmail:/data" depends_on: - imap + networks: + - webmail networks: @@ -114,6 +119,8 @@ networks: driver: default config: - subnet: 192.168.203.0/24 + webmail: + driver: bridge noinet: driver: bridge internal: true