aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/by-name/sn/snm-email-single-server/test.nix6
-rw-r--r--tests/common/dns/client.nix5
-rw-r--r--tests/common/dns/server.nix4
-rw-r--r--tests/common/email/functions.nix4
-rw-r--r--tests/default.nix4
5 files changed, 17 insertions, 6 deletions
diff --git a/tests/by-name/sn/snm-email-single-server/test.nix b/tests/by-name/sn/snm-email-single-server/test.nix
index 5ff655f..6f14307 100644
--- a/tests/by-name/sn/snm-email-single-server/test.nix
+++ b/tests/by-name/sn/snm-email-single-server/test.nix
@@ -79,6 +79,12 @@ in
ALICE
EOF
''}")
+
+ # TODO: Find a better way to wait until alice mail has finished going through the
+ # email queue <2026-11-26>
+ from time import sleep
+ sleep(2)
+
bob.succeed("sudo -u bob ${common.scripts.expectNewMail}")
'';
}
diff --git a/tests/common/dns/client.nix b/tests/common/dns/client.nix
index 2e057a9..384f1c9 100644
--- a/tests/common/dns/client.nix
+++ b/tests/common/dns/client.nix
@@ -8,4 +8,9 @@
# Instead of doing the dance with root dns servers and what-not, we just force them
# to directly connect to our authoritative dns server for the zones we have.
networking.nameservers = lib.mkForce nodes.name_server.vhack.nsd.interfaces;
+
+ # `unbound` might be active, but it's utterly pointless in a test environment (there is
+ # no network access). So we disable it, which means that the nameservers, configured
+ # above, actually mean something.
+ vhack.unbound.enable = lib.mkForce false;
}
diff --git a/tests/common/dns/server.nix b/tests/common/dns/server.nix
index 5f8d470..a3a603f 100644
--- a/tests/common/dns/server.nix
+++ b/tests/common/dns/server.nix
@@ -3,10 +3,6 @@
config,
...
}: {
- imports = [
- ../../../modules
- ];
-
vhack = {
# Enable unbound, so we can resolve our own zones.
unbound.enable = true;
diff --git a/tests/common/email/functions.nix b/tests/common/email/functions.nix
index ac9c329..0628a2f 100644
--- a/tests/common/email/functions.nix
+++ b/tests/common/email/functions.nix
@@ -12,7 +12,7 @@
exit 1
}
'';
- expectNewMail = pkgs.writeShellScript "assert-empty-emails" ''
+ expectNewMail = pkgs.writeShellScript "assert-new-emails" ''
set -xe
# fetchmail returns EXIT_CODE 1 when no new mail
@@ -21,7 +21,7 @@
exit 1
}
'';
- expectNewSpamMail = pkgs.writeShellScript "assert-empty-emails" ''
+ expectNewSpamMail = pkgs.writeShellScript "assert-new-spam-emails" ''
set -xe
# fetchmail returns EXIT_CODE 1 when no new mail
diff --git a/tests/default.nix b/tests/default.nix
index fd53457..254f64c 100644
--- a/tests/default.nix
+++ b/tests/default.nix
@@ -91,12 +91,16 @@
imports = [
./common/acme/server.nix
./common/dns/client.nix
+
+ ../modules
];
};
name_server = {nodes, ...}: {
imports = [
./common/acme/client.nix
./common/dns/server.nix
+
+ ../modules
];
vhack.nsd.zones = let