Added missing tests
This commit is contained in:
parent
da32070137
commit
6300ee451c
|
@ -14,6 +14,44 @@ load 'test_helper/bats-assert/load'
|
||||||
assert_success
|
assert_success
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@test "checking configuration: hostname/domainname override: check container hostname is applied correctly" {
|
||||||
|
run docker exec mail_override_hostname /bin/bash -c "hostname | grep unknown.domain.tld"
|
||||||
|
assert_success
|
||||||
|
}
|
||||||
|
|
||||||
|
@test "checking configuration: hostname/domainname override: check overriden hostname is applied to all configs" {
|
||||||
|
run docker exec mail_override_hostname /bin/bash -c "cat /etc/mailname | grep my-domain.com"
|
||||||
|
assert_success
|
||||||
|
run docker exec mail_override_hostname /bin/bash -c "postconf -n | grep mydomain | grep my-domain.com"
|
||||||
|
assert_success
|
||||||
|
run docker exec mail_override_hostname /bin/bash -c "postconf -n | grep myhostname | grep mail.my-domain.com"
|
||||||
|
assert_success
|
||||||
|
run docker exec mail_override_hostname /bin/bash -c "doveconf | grep hostname | grep mail.my-domain.com"
|
||||||
|
assert_success
|
||||||
|
run docker exec mail_override_hostname /bin/bash -c "cat /etc/opendmarc.conf | grep AuthservID | grep mail.my-domain.com"
|
||||||
|
assert_success
|
||||||
|
run docker exec mail_override_hostname /bin/bash -c "cat /etc/opendmarc.conf | grep TrustedAuthservIDs | grep mail.my-domain.com"
|
||||||
|
assert_success
|
||||||
|
run docker exec mail_override_hostname /bin/bash -c "cat /etc/amavis/conf.d/05-node_id | grep myhostname | grep mail.my-domain.com"
|
||||||
|
assert_success
|
||||||
|
}
|
||||||
|
|
||||||
|
@test "checking configuration: hostname/domainname override: check hostname in postfix HELO message" {
|
||||||
|
run docker exec mail_override_hostname /bin/bash -c "nc -w 1 0.0.0.0 25 | grep mail.my-domain.com"
|
||||||
|
assert_success
|
||||||
|
}
|
||||||
|
|
||||||
|
@test "checking configuration: hostname/domainname override: check headers of received mail" {
|
||||||
|
run docker exec mail_override_hostname /bin/sh -c "ls -A /var/mail/localhost.localdomain/user1/new | wc -l | grep 1"
|
||||||
|
assert_success
|
||||||
|
run docker exec mail_override_hostname /bin/sh -c "cat /var/mail/localhost.localdomain/user1/new/* | grep mail.my-domain.com"
|
||||||
|
assert_success
|
||||||
|
|
||||||
|
# test whether the container hostname is not found in received mail
|
||||||
|
run docker exec mail_override_hostname /bin/sh -c "cat /var/mail/localhost.localdomain/user1/new/* | grep unknown.domain.tld"
|
||||||
|
assert_failure
|
||||||
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# processes
|
# processes
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in New Issue