diff --git a/nix/vm-tests/container-deferred-start.nix b/nix/vm-tests/container-deferred-start.nix index 107ba336e..2a3e4f164 100644 --- a/nix/vm-tests/container-deferred-start.nix +++ b/nix/vm-tests/container-deferred-start.nix @@ -93,7 +93,11 @@ pkgs.testers.runNixOSTest { host.fail("systemctl start container@old.service") out = host.succeed("journalctl -u container@old.service --no-pager -o cat") assert "start operation timed out" in out, out - host.succeed("systemctl stop container@old.service; systemctl reset-failed container@old.service") + assert "Failed with result 'timeout'" in out, out + # The failed start leaves nothing to reset: stopping unloads the unit. + host.succeed("systemctl stop container@old.service") + state = host.execute("systemctl is-active container@old.service")[1].strip() + assert state == "inactive", state with subtest("a daemon named in startAfterReady: the container's start ends inside the limit"): host.succeed("systemctl start container@new.service")