aboutsummaryrefslogtreecommitdiffstats
path: root/tests/vm.nix
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-13 20:38:10 +0000
committertv <tv@krebsco.de>2026-11-13 22:02:18 +0100
commit21c791e7c0b91ad984d1205d70398e426f7517d7 (patch)
tree0ca0e160b05330948594b70a3c0145385488b87f /tests/vm.nix
parentc4d5c98d460c4e53077ff00bc21c40631eee290d (diff)
tests: check what populate mustn't print
A phase's unexpected lists what populate is expected not to print, whether it succeeds or not. notdir expects populate not to go on locking after it fails to find the URL of a source drawn from, which would lock the current directory, the login directory on a remote target, copying it into the store.
Diffstat (limited to 'tests/vm.nix')
-rw-r--r--tests/vm.nix5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/vm.nix b/tests/vm.nix
index 25a12a4..8a08819 100644
--- a/tests/vm.nix
+++ b/tests/vm.nix
@@ -158,6 +158,11 @@ in pkgs.testers.runNixOSTest {
f"env HOME=/root {phase['env']} timeout {limit} {phase['populate']} </dev/null 2>&1",
timeout=900,
)
+ for unexpected in phase["unexpected"]:
+ if unexpected in out:
+ raise Exception(
+ f"populate {i} prints {unexpected!r}:\n{out}"
+ )
if phase["interrupt"] is not None:
if status != 124:
raise Exception(f"populate {i} ends on its own:\n{out}")