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