about summary refs log tree commit diff
path: root/nixos/tests
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2022-08-01 00:02:41 +0000
committerGitHub <noreply@github.com>2022-08-01 00:02:41 +0000
commit83256fd7ea60b1fbbc9659a249fedf6d14f24c01 (patch)
tree5138406a61b99b2ecb84d47ea4b2b093da0dbeb1 /nixos/tests
parent0893e1f0e593472b6f8f209959960a165c9bd48a (diff)
parent5857574d45925585baffde730369414319228a84 (diff)
Merge master into staging-next
Diffstat (limited to 'nixos/tests')
-rw-r--r--nixos/tests/systemd-machinectl.nix4
1 files changed, 2 insertions, 2 deletions
diff --git a/nixos/tests/systemd-machinectl.nix b/nixos/tests/systemd-machinectl.nix
index ce0c56a360e96..d4a23877aa4c7 100644
--- a/nixos/tests/systemd-machinectl.nix
+++ b/nixos/tests/systemd-machinectl.nix
@@ -32,7 +32,6 @@ import ./make-test-python.nix (
       # use networkd to obtain systemd network setup
       networking.useNetworkd = true;
       networking.useDHCP = false;
-      services.resolved.enable = false;
 
       # open DHCP server on interface to container
       networking.firewall.trustedInterfaces = [ "ve-+" ];
@@ -64,7 +63,7 @@ import ./make-test-python.nix (
       machine.succeed("ping -n -c 1 ${containerName}");
 
       # Test systemd-nspawn uses a user namespace
-      machine.succeed("test `stat ${containerRoot}/var/empty -c %u%g` != 00");
+      machine.succeed("test $(machinectl status ${containerName} | grep 'UID Shift: ' | wc -l) = 1")
 
       # Test systemd-nspawn reboot
       machine.succeed("machinectl shell ${containerName} /run/current-system/sw/bin/reboot");
@@ -76,6 +75,7 @@ import ./make-test-python.nix (
 
       # Test machinectl stop
       machine.succeed("machinectl stop ${containerName}");
+      machine.wait_until_succeeds("test $(systemctl is-active systemd-nspawn@${containerName}) = inactive");
 
       # Show to to delete the container
       machine.succeed("chattr -i ${containerRoot}/var/empty");