aboutsummaryrefslogtreecommitdiffstats
path: root/tests/scenarios.nix
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-13 04:49:28 +0000
committertv <tv@krebsco.de>2026-11-13 04:49:28 +0000
commitb3c671bed4e785c732fdd881cf1cc39d852eb3bb (patch)
tree136d29e5b909638cc8245df9b9c69b18f7911bad /tests/scenarios.nix
parent400006448a470d7f71393aaa461542b4764df4dd (diff)
populate: name the target's user in messages unless it's root
Messages naming the target, i.e. pruning's lines and the errors about the sentinel, name the user as well, as user@host:path, unless the user is root, the usual one, so deploying as another user, e.g. with sudo, shows.
Diffstat (limited to 'tests/scenarios.nix')
-rw-r--r--tests/scenarios.nix8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/scenarios.nix b/tests/scenarios.nix
index fea0a5a..90fe3cb 100644
--- a/tests/scenarios.nix
+++ b/tests/scenarios.nix
@@ -1050,9 +1050,11 @@ assert !(krops.isLocalTarget (targets.remote "/"));
sources = { inherit (sources) a; b.symlink = "a"; };
prune = true;
output = map
- (name: "pruning ${
- optionalString (targetKind != "local") "${remoteHost}:"
- }/var/krops/prune-${targetKind}/${name}")
+ (name: "pruning '${{
+ local = "";
+ remote = "${remoteHost}:";
+ sudo = "deploy@${remoteHost}:";
+ }.${targetKind}}/var/krops/prune-${targetKind}/${name}'...")
[ "c" "d" "other" ];
check = ''
test -e "$T"/a/flake.nix || fail "a removed"