From 7ccf35cb5febe8d6140517ad64d312bc06143a5f Mon Sep 17 00:00:00 2001 From: Symphorien Gibol Date: Fri, 1 May 2020 12:00:00 +0000 Subject: [PATCH] tests/clamav.nix: relax expected error message with rspamd 2.5 it only says Spam message rejected --- tests/clamav.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/clamav.nix b/tests/clamav.nix index 406a392..05cb30c 100644 --- a/tests/clamav.nix +++ b/tests/clamav.nix @@ -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" ]'); };