about summary refs log tree commit diff
path: root/nixos/tests/systemd.nix
diff options
context:
space:
mode:
authorArian van Putten <aeroboy94@gmail.com>2018-11-13 17:06:03 +0100
committerArian van Putten <aeroboy94@gmail.com>2018-12-12 15:35:39 +0100
commiteb880051300257cc1e465cbb8042d6e65caf67d6 (patch)
treea44853d1cc959ddbca3c0b84a22d403ab41f6683 /nixos/tests/systemd.nix
parentf9b07819389b631f5ea2c1daa2baf84fa0d30947 (diff)
downloadnixlib-eb880051300257cc1e465cbb8042d6e65caf67d6.tar
nixlib-eb880051300257cc1e465cbb8042d6e65caf67d6.tar.gz
nixlib-eb880051300257cc1e465cbb8042d6e65caf67d6.tar.bz2
nixlib-eb880051300257cc1e465cbb8042d6e65caf67d6.tar.lz
nixlib-eb880051300257cc1e465cbb8042d6e65caf67d6.tar.xz
nixlib-eb880051300257cc1e465cbb8042d6e65caf67d6.tar.zst
nixlib-eb880051300257cc1e465cbb8042d6e65caf67d6.zip
nixos/systemd: Add a regression test for #50273
Diffstat (limited to 'nixos/tests/systemd.nix')
-rw-r--r--nixos/tests/systemd.nix5
1 files changed, 5 insertions, 0 deletions
diff --git a/nixos/tests/systemd.nix b/nixos/tests/systemd.nix
index 65aa553b3148..4d470126abee 100644
--- a/nixos/tests/systemd.nix
+++ b/nixos/tests/systemd.nix
@@ -56,6 +56,11 @@ import ./make-test.nix {
       $machine->succeed('test -z $(ls -1 /var/log/journal)');
     };
 
+    # Regression test for https://github.com/NixOS/nixpkgs/issues/50273
+    subtest "DynamicUser actually allocates a user", sub {
+        $machine->succeed('systemd-run --pty --property=Type=oneshot --property=DynamicUser=yes --property=User=iamatest whoami | grep iamatest');
+    };
+
     # Regression test for https://github.com/NixOS/nixpkgs/issues/35268
     subtest "file system with x-initrd.mount is not unmounted", sub {
       $machine->shutdown;