about summary refs log tree commit diff
path: root/nixos/tests
diff options
context:
space:
mode:
authorRobert Hensing <roberth@users.noreply.github.com>2024-01-30 19:02:37 +0100
committerGitHub <noreply@github.com>2024-01-30 19:02:37 +0100
commit056a4d8d52b00ac50eb4aacf56ab15e111bea0c1 (patch)
treeecf7fbebf21962e0f15ef3ab26eec8da7b6bf14f /nixos/tests
parent004318a239e60a9ba11d0e4c3758a1b304670039 (diff)
parentd45acb5457503a8d0b82fed1f8aeb68ea3a4cd8e (diff)
Merge pull request #283406 from tfc/nixos-rebuild-socket
nixos-rebuild: Handle too-long tmpdir paths on macOS
Diffstat (limited to 'nixos/tests')
-rw-r--r--nixos/tests/nixos-rebuild-target-host.nix5
1 files changed, 5 insertions, 0 deletions
diff --git a/nixos/tests/nixos-rebuild-target-host.nix b/nixos/tests/nixos-rebuild-target-host.nix
index 8d60b788abf38..bf80b2fa66062 100644
--- a/nixos/tests/nixos-rebuild-target-host.nix
+++ b/nixos/tests/nixos-rebuild-target-host.nix
@@ -132,5 +132,10 @@ import ./make-test-python.nix ({ pkgs, ... }: {
         deployer.succeed("passh -c 3 -C -p ${nodes.target.users.users.bob.password} -P \"\[sudo\] password\" nixos-rebuild switch -I nixos-config=/root/configuration-3.nix --target-host bob@target --use-remote-sudo &>/dev/console")
         target_hostname = deployer.succeed("ssh alice@target cat /etc/hostname").rstrip()
         assert target_hostname == "config-3-deployed", f"{target_hostname=}"
+
+      with subtest("Deploy works with very long TMPDIR"):
+        tmp_dir = "/var/folder/veryveryveryveryverylongpathnamethatdoesnotworkwithcontrolpath"
+        deployer.succeed(f"mkdir -p {tmp_dir}")
+        deployer.succeed(f"TMPDIR={tmp_dir} nixos-rebuild switch -I nixos-config=/root/configuration-1.nix --target-host root@target &>/dev/console")
     '';
 })