diff --git a/nix/sources.json b/nix/sources.json index 1edeea8..a669d85 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -36,10 +36,10 @@ "homepage": "https://github.com/NixOS/nixpkgs", "owner": "NixOS", "repo": "nixpkgs", - "rev": "e5cc06a1e806070693add4f231060a62b962fc44", - "sha256": "04543i332fx9m7jf6167ac825s4qb8is0d0x0pz39il979mlc87v", + "rev": "1905f5f2e55e0db0bb6244cfe62cb6c0dbda391d", + "sha256": "148f79hhya66qj8v5gn7bs6zrfjy1nbvdciyxdm4yd5p8r6ayzv6", "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/e5cc06a1e806070693add4f231060a62b962fc44.tar.gz", + "url": "https://github.com/NixOS/nixpkgs/archive/1905f5f2e55e0db0bb6244cfe62cb6c0dbda391d.tar.gz", "url_template": "https://github.com///archive/.tar.gz" } } 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 diff --git a/tests/external.nix b/tests/external.nix index f453608..55d9eb5 100644 --- a/tests/external.nix +++ b/tests/external.nix @@ -345,7 +345,7 @@ pkgs.nixosTest { # TODO put this blocking into the systemd units? 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 ]" ) client.execute("cp -p /etc/root/.* ~/") @@ -489,11 +489,11 @@ pkgs.nixosTest { client.fail("search Junk a >&2") # check that search really goes through the indexer server.succeed( - "journalctl -u dovecot2 | grep -E 'indexer-worker.*Indexed . messages in INBOX' >&2" + "journalctl -u dovecot2 | grep -E 'indexer-worker.* Mailbox INBOX: Indexed' >&2" ) # check that Junk is not indexed server.fail( - "journalctl -u dovecot2 | grep -E 'indexer-worker.*Indexed . messages in Junk' >&2" + "journalctl -u dovecot2 | grep -E 'indexer-worker.* Mailbox JUNK: Indexed' >&2" ) with subtest("no warnings or errors"): diff --git a/tests/internal.nix b/tests/internal.nix index 12590c0..c64339a 100644 --- a/tests/internal.nix +++ b/tests/internal.nix @@ -133,7 +133,7 @@ pkgs.nixosTest { machine.wait_for_open_port(25) # TODO put this blocking into the systemd units machine.wait_until_succeeds( - "timeout 1 ${pkgs.netcat}/bin/nc -U /run/rspamd/rspamd-milter.sock < /dev/null; [ $? -eq 124 ]" + "set +e; timeout 1 ${pkgs.netcat}/bin/nc -U /run/rspamd/rspamd-milter.sock < /dev/null; [ $? -eq 124 ]" ) machine.succeed( "cat ${sendMail} | ${pkgs.netcat-gnu}/bin/nc localhost 25 | grep -q 'This account cannot receive emails'" @@ -141,7 +141,7 @@ pkgs.nixosTest { with subtest("rspamd controller serves web ui"): machine.succeed( - "${pkgs.curl}/bin/curl --unix-socket /run/rspamd/worker-controller.sock http://localhost/ | grep -q ''" + "set +o pipefail; ${pkgs.curl}/bin/curl --unix-socket /run/rspamd/worker-controller.sock http://localhost/ | grep -q ''" ) with subtest("imap port 143 is closed and imaps is serving SSL"): diff --git a/tests/multiple.nix b/tests/multiple.nix index 9f54cff..3377906 100644 --- a/tests/multiple.nix +++ b/tests/multiple.nix @@ -68,10 +68,10 @@ pkgs.nixosTest { # TODO put this blocking into the systemd units? domain1.wait_until_succeeds( - "timeout 1 ${pkgs.netcat}/bin/nc -U /run/rspamd/rspamd-milter.sock < /dev/null; [ $? -eq 124 ]" + "set +e; timeout 1 ${pkgs.netcat}/bin/nc -U /run/rspamd/rspamd-milter.sock < /dev/null; [ $? -eq 124 ]" ) domain2.wait_until_succeeds( - "timeout 1 ${pkgs.netcat}/bin/nc -U /run/rspamd/rspamd-milter.sock < /dev/null; [ $? -eq 124 ]" + "set +e; timeout 1 ${pkgs.netcat}/bin/nc -U /run/rspamd/rspamd-milter.sock < /dev/null; [ $? -eq 124 ]" ) # user@domain1.com sends a mail to user@domain2.com