From d712a29baf0046c6ac76f631a2ea00891d149667 Mon Sep 17 00:00:00 2001 From: Martin Schulze Date: Wed, 7 Aug 2019 21:45:52 +0200 Subject: [PATCH] Check for PERMIT_DOCKER correct postfix settings --- test/permit_docker.bats | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/permit_docker.bats b/test/permit_docker.bats index 982ecc37..c4ffc7f4 100644 --- a/test/permit_docker.bats +++ b/test/permit_docker.bats @@ -64,6 +64,12 @@ function repeat_until_success_or_timeout { } @test "checking PERMIT_DOCKER: connected-networks" { + ipnet1=$(docker network inspect --format '{{(index .IPAM.Config 0).Subnet}}' non-default-docker-mail-network) + ipnet2=$(docker network inspect --format '{{(index .IPAM.Config 0).Subnet}}' non-default-docker-mail-network2) + run docker exec mail_smtponly_second_network /bin/sh -c "postconf | grep '^mynetworks ='" + assert_output --partial $ipnet1 + assert_output --partial $ipnet2 + run docker exec mail_smtponly_second_network /bin/sh -c "postconf -e smtp_host_lookup=no" assert_success run docker exec mail_smtponly_second_network /bin/sh -c "/etc/init.d/postfix reload"