From 74452917fb90fd4a257ebb701f20b3ad6e713f97 Mon Sep 17 00:00:00 2001 From: Thomas VIAL Date: Mon, 19 Oct 2015 12:06:11 +0200 Subject: [PATCH] Added tests on error logs --- test/test.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) mode change 100755 => 100644 test/test.sh diff --git a/test/test.sh b/test/test.sh old mode 100755 new mode 100644 index 6cca8dcd..61b621c4 --- a/test/test.sh +++ b/test/test.sh @@ -12,7 +12,7 @@ assert_raises "docker exec mail ps aux --forest | grep '/usr/sbin/amavisd-new'" # Testing user creation 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 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 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 assert_end