mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2024-01-19 02:48:50 +00:00
Add tests for additional dovecot configs
This commit is contained in:
parent
9afd46df9d
commit
bcd844b568
1
test/config/dovecot.cf
Normal file
1
test/config/dovecot.cf
Normal file
|
@ -0,0 +1 @@
|
||||||
|
mail_max_userip_connections = 69
|
|
@ -222,6 +222,18 @@
|
||||||
[ "$status" -eq 0 ]
|
[ "$status" -eq 0 ]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# dovecot
|
||||||
|
#
|
||||||
|
|
||||||
|
@test "checking dovecot: config additions" {
|
||||||
|
run docker exec mail grep -q 'mail_max_userip_connections = 69' /tmp/docker-mailserver/dovecot.cf
|
||||||
|
[ "$status" -eq 0 ]
|
||||||
|
run docker exec mail /bin/sh -c "doveconf | grep 'mail_max_userip_connections = 69'"
|
||||||
|
[ "$status" -eq 0 ]
|
||||||
|
[ "$output" = 'mail_max_userip_connections = 69' ]
|
||||||
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# spamassassin
|
# spamassassin
|
||||||
#
|
#
|
||||||
|
@ -266,25 +278,25 @@
|
||||||
-v "$(pwd)/test/config/empty/":/tmp/docker-mailserver/ \
|
-v "$(pwd)/test/config/empty/":/tmp/docker-mailserver/ \
|
||||||
-v "$(pwd)/test/config/postfix-accounts.cf":/tmp/docker-mailserver/postfix-accounts.cf \
|
-v "$(pwd)/test/config/postfix-accounts.cf":/tmp/docker-mailserver/postfix-accounts.cf \
|
||||||
-v "$(pwd)/test/config/postfix-virtual.cf":/tmp/docker-mailserver/postfix-virtual.cf \
|
-v "$(pwd)/test/config/postfix-virtual.cf":/tmp/docker-mailserver/postfix-virtual.cf \
|
||||||
`docker inspect --format '{{ .Config.Image }}' mail` /bin/sh -c 'generate-dkim-config | wc -l'
|
`docker inspect --format '{{ .Config.Image }}' mail` /bin/sh -c 'generate-dkim-config | wc -l'
|
||||||
[ "$status" -eq 0 ]
|
[ "$status" -eq 0 ]
|
||||||
[ "$output" -eq 5 ]
|
[ "$output" -eq 5 ]
|
||||||
# Check keys for localhost.localdomain
|
# Check keys for localhost.localdomain
|
||||||
run docker run --rm \
|
run docker run --rm \
|
||||||
-v "$(pwd)/test/config/empty/opendkim":/etc/opendkim \
|
-v "$(pwd)/test/config/empty/opendkim":/etc/opendkim \
|
||||||
`docker inspect --format '{{ .Config.Image }}' mail` /bin/sh -c 'ls -1 /etc/opendkim/keys/localhost.localdomain/ | wc -l'
|
`docker inspect --format '{{ .Config.Image }}' mail` /bin/sh -c 'ls -1 /etc/opendkim/keys/localhost.localdomain/ | wc -l'
|
||||||
[ "$status" -eq 0 ]
|
[ "$status" -eq 0 ]
|
||||||
[ "$output" -eq 2 ]
|
[ "$output" -eq 2 ]
|
||||||
# Check keys for otherdomain.tld
|
# Check keys for otherdomain.tld
|
||||||
run docker run --rm \
|
run docker run --rm \
|
||||||
-v "$(pwd)/test/config/empty/opendkim":/etc/opendkim \
|
-v "$(pwd)/test/config/empty/opendkim":/etc/opendkim \
|
||||||
`docker inspect --format '{{ .Config.Image }}' mail` /bin/sh -c 'ls -1 /etc/opendkim/keys/otherdomain.tld | wc -l'
|
`docker inspect --format '{{ .Config.Image }}' mail` /bin/sh -c 'ls -1 /etc/opendkim/keys/otherdomain.tld | wc -l'
|
||||||
[ "$status" -eq 0 ]
|
[ "$status" -eq 0 ]
|
||||||
[ "$output" -eq 2 ]
|
[ "$output" -eq 2 ]
|
||||||
# Check presence of tables and TrustedHosts
|
# Check presence of tables and TrustedHosts
|
||||||
run docker run --rm \
|
run docker run --rm \
|
||||||
-v "$(pwd)/test/config/empty/opendkim":/etc/opendkim \
|
-v "$(pwd)/test/config/empty/opendkim":/etc/opendkim \
|
||||||
`docker inspect --format '{{ .Config.Image }}' mail` /bin/sh -c "ls -1 etc/opendkim | grep -E 'KeyTable|SigningTable|TrustedHosts|keys'|wc -l"
|
`docker inspect --format '{{ .Config.Image }}' mail` /bin/sh -c "ls -1 etc/opendkim | grep -E 'KeyTable|SigningTable|TrustedHosts|keys'|wc -l"
|
||||||
[ "$status" -eq 0 ]
|
[ "$status" -eq 0 ]
|
||||||
[ "$output" -eq 4 ]
|
[ "$output" -eq 4 ]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue