summaryrefslogtreecommitdiffstats
path: root/nixos/tests
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2021-11-09 00:02:13 +0000
committerGitHub <noreply@github.com>2021-11-09 00:02:13 +0000
commitb1d2f20ea8e04d6211bc20d3eb6d4c5c08b7db86 (patch)
treeb38b1a4f11ea5321148967f02604186c12000bfc /nixos/tests
parent3a3bdc57e48b897441e50e6b877031906dfce6dc (diff)
parent707b006bf7ea81dae47511d7008a4c93ff62875a (diff)
Merge staging-next into staging
Diffstat (limited to 'nixos/tests')
-rw-r--r--nixos/tests/doas.nix8
1 files changed, 8 insertions, 0 deletions
diff --git a/nixos/tests/doas.nix b/nixos/tests/doas.nix
index 5e9ce4b2c799..7f038b2bee29 100644
--- a/nixos/tests/doas.nix
+++ b/nixos/tests/doas.nix
@@ -85,6 +85,14 @@ import ./make-test-python.nix (
# ../../pkgs/tools/security/doas/0001-add-NixOS-specific-dirs-to-safe-PATH.patch
with subtest("recursive calls to doas from subprocesses should succeed"):
machine.succeed('doas -u test0 sh -c "doas -u test0 true"')
+
+ with subtest("test0 should inherit TERMINFO_DIRS from the user environment"):
+ dirs = machine.succeed(
+ "su - test0 -c 'doas -u root $SHELL -c \"echo \$TERMINFO_DIRS\"'"
+ )
+
+ if not "test0" in dirs:
+ raise Exception(f"user profile TERMINFO_DIRS is not preserved: {dirs}")
'';
}
)