summaryrefslogtreecommitdiffstats
path: root/tests/clamav.nix
diff options
context:
space:
mode:
authorAntoine Eiche <lewo@abesis.fr>2021-06-24 21:29:23 +0200
committerAntoine Eiche <lewo@abesis.fr>2021-06-24 23:02:58 +0200
commita9f87ca461a1f0e23e85a1ba8c696672ed9e11e2 (patch)
tree7d63cb5d010257a339b453619aaa88291332e28f /tests/clamav.nix
parent5675b122a947b40e551438df6a623efad19fd2e7 (diff)
Update nixpkgs-unstableupdate-nixpkgs-unstable
Because of https://github.com/NixOS/nixpkgs/commit/b7749c76715ba96727f7a12bc2514ddfa6847813 we need to `set +o pipefail` several asserts.
Diffstat (limited to 'tests/clamav.nix')
-rw-r--r--tests/clamav.nix8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/clamav.nix b/tests/clamav.nix
index f62df58..f818991 100644
--- a/tests/clamav.nix
+++ b/tests/clamav.nix
@@ -196,10 +196,10 @@ pkgs.nixosTest {
# TODO put this blocking into the systemd units? I am not sure if rspamd already waits for the clamd socket.
server.wait_until_succeeds(
- "timeout 1 ${nodes.server.pkgs.netcat}/bin/nc -U /run/rspamd/rspamd-milter.sock < /dev/null; [ $? -eq 124 ]"
+ "set +e; timeout 1 ${nodes.server.pkgs.netcat}/bin/nc -U /run/rspamd/rspamd-milter.sock < /dev/null; [ $? -eq 124 ]"
)
server.wait_until_succeeds(
- "timeout 1 ${nodes.server.pkgs.netcat}/bin/nc -U /run/clamav/clamd.ctl < /dev/null; [ $? -eq 124 ]"
+ "set +e; timeout 1 ${nodes.server.pkgs.netcat}/bin/nc -U /run/clamav/clamd.ctl < /dev/null; [ $? -eq 124 ]"
)
client.execute("cp -p /etc/root/.* ~/")
@@ -224,12 +224,12 @@ pkgs.nixosTest {
with subtest("virus scan file"):
server.succeed(
- 'clamdscan $(readlink -f /etc/root/eicar.com.txt) | grep "Txt\\.Malware\\.Agent-1787597 FOUND" >&2'
+ 'set +o pipefail; clamdscan $(readlink -f /etc/root/eicar.com.txt) | grep "Txt\\.Malware\\.Agent-1787597 FOUND" >&2'
)
with subtest("virus scan email"):
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'
+ 'set +o pipefail; 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