tests/clamav.nix: relax expected error message

with rspamd 2.5 it only says Spam message rejected
This commit is contained in:
Symphorien Gibol 2020-05-01 12:00:00 +00:00 committed by lewo
parent 9e772d166c
commit 7ccf35cb5f

View File

@ -228,7 +228,8 @@ import (pkgs.path + "/nixos/tests/make-test.nix") {
};
subtest "virus scan email", sub {
$client->succeed("msmtp -a user2 user1\@example.com < /etc/root/virus-email 2>&1 | grep \"server message: 554 5\\.7\\.1 clamav: virus found: .*\\(Eicar\\|EICAR\\)\" >&2"); # for some reason this ID is nondetermistic...
$client->succeed("msmtp -a user2 user1\@example.com < /etc/root/virus-email 2>&1 | tee /dev/stderr | grep \"server message: 554 5\\.7\\.1\" >&2");
$server->succeed("journalctl -u rspamd | grep -i eicar");
# give the mail server some time to process the mail
$server->waitUntilFails('[ "$(postqueue -p)" != "Mail queue is empty" ]');
};