mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2024-01-19 02:48:50 +00:00
Add setup/teardown marker tests
This commit is contained in:
parent
b90faaeb35
commit
ef80c6b2a3
|
@ -85,6 +85,11 @@ function count_processed_changes() {
|
||||||
docker exec $containerName cat /var/log/supervisor/changedetector.log | grep "Change detected" | wc -l
|
docker exec $containerName cat /var/log/supervisor/changedetector.log | grep "Change detected" | wc -l
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# this test must come first to reliably identify when to run setup_file
|
||||||
|
@test "first" {
|
||||||
|
skip 'Starting testing of letsencrypt SSL'
|
||||||
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# configuration checks
|
# configuration checks
|
||||||
#
|
#
|
||||||
|
@ -238,7 +243,7 @@ function count_processed_changes() {
|
||||||
@test "checking smtp: delivers mail to existing account" {
|
@test "checking smtp: delivers mail to existing account" {
|
||||||
run docker exec mail /bin/sh -c "grep 'postfix/lmtp' /var/log/mail/mail.log | grep 'status=sent' | grep ' Saved)' | sed 's/.* to=</</g' | sed 's/, relay.*//g' | sort | uniq -c | tr -s \" \""
|
run docker exec mail /bin/sh -c "grep 'postfix/lmtp' /var/log/mail/mail.log | grep 'status=sent' | grep ' Saved)' | sed 's/.* to=</</g' | sed 's/, relay.*//g' | sort | uniq -c | tr -s \" \""
|
||||||
assert_success
|
assert_success
|
||||||
cat <<'EOF' | assert_output
|
assert_output <<'EOF'
|
||||||
1 <added@localhost.localdomain>
|
1 <added@localhost.localdomain>
|
||||||
6 <user1@localhost.localdomain>
|
6 <user1@localhost.localdomain>
|
||||||
1 <user1@localhost.localdomain>, orig_to=<postmaster@my-domain.com>
|
1 <user1@localhost.localdomain>, orig_to=<postmaster@my-domain.com>
|
||||||
|
@ -1624,3 +1629,7 @@ EOF
|
||||||
run docker exec mail grep "Subject: Root Test Message" /var/mail/localhost.localdomain/user1/new/ -R
|
run docker exec mail grep "Subject: Root Test Message" /var/mail/localhost.localdomain/user1/new/ -R
|
||||||
assert_success
|
assert_success
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@test "last" {
|
||||||
|
# this test is only there to reliably mark the end for the teardown_file
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue