mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2024-01-19 02:48:50 +00:00
Added tests on error logs
This commit is contained in:
parent
201dd22092
commit
dab9d59399
6
test/test.sh
Executable file → Normal file
6
test/test.sh
Executable file → Normal file
|
@ -12,7 +12,7 @@ assert_raises "docker exec mail ps aux --forest | grep '/usr/sbin/amavisd-new'"
|
||||||
|
|
||||||
# Testing user creation
|
# Testing user creation
|
||||||
assert "docker exec mail ls -A /var/mail/localhost.localdomain/user1" "cur\nnew\ntmp"
|
assert "docker exec mail ls -A /var/mail/localhost.localdomain/user1" "cur\nnew\ntmp"
|
||||||
assert "docker exec mail ls /var/mail/otherdomain.tld/user2" "cur\nnew\ntmp"
|
assert "docker exec mail ls -A /var/mail/otherdomain.tld/user2" "cur\nnew\ntmp"
|
||||||
|
|
||||||
# Testing that mail is received for existing user
|
# Testing that mail is received for existing user
|
||||||
assert_raises "docker exec mail grep 'status=sent (delivered to maildir)' /var/log/mail.log" "false"
|
assert_raises "docker exec mail grep 'status=sent (delivered to maildir)' /var/log/mail.log" "false"
|
||||||
|
@ -21,5 +21,9 @@ assert "docker exec mail ls -A /var/mail/localhost.localdomain/user1/new | wc -l
|
||||||
# Testing presence of freshclam CRON
|
# Testing presence of freshclam CRON
|
||||||
assert "docker exec mail crontab -l" "0 1 * * * /usr/bin/freshclam --quiet"
|
assert "docker exec mail crontab -l" "0 1 * * * /usr/bin/freshclam --quiet"
|
||||||
|
|
||||||
|
# Testing that log don't display errors
|
||||||
|
assert_raises "docker exec mail grep 'non-null host address bits in' /var/log/mail.log" "false"
|
||||||
|
assert_raises "docker exec mail grep ': error:' /var/log/mail.log" "false"
|
||||||
|
|
||||||
# Ending tests
|
# Ending tests
|
||||||
assert_end
|
assert_end
|
||||||
|
|
Loading…
Reference in a new issue