From 61d37d773358ee34d5fffd99e38eb566981effbd Mon Sep 17 00:00:00 2001 From: Jared Baur Date: Fri, 11 Jul 2025 23:45:16 -0700 Subject: [PATCH] nixosTests.systemd-sysupdate: use updatectl as frontend for updates --- nixos/tests/systemd-sysupdate.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/nixos/tests/systemd-sysupdate.nix b/nixos/tests/systemd-sysupdate.nix index 059f2db5df41..5ab5da738171 100644 --- a/nixos/tests/systemd-sysupdate.nix +++ b/nixos/tests/systemd-sysupdate.nix @@ -1,7 +1,7 @@ # Tests downloading a signed update artifact from a server to a target machine. # This test does not rely on the `systemd.timer` units provided by the -# `systemd-sysupdate` module but triggers the `systemd-sysupdate` service -# manually to make the test more robust. +# `systemd-sysupdate` module but triggers the `updatectl` tool directly to +# demonstrate how to initiate updates manually. { lib, pkgs, ... }: @@ -62,7 +62,8 @@ in testScript = '' server.wait_for_unit("nginx.service") - target.succeed("systemctl start systemd-sysupdate") + print(target.succeed("updatectl list")) + target.succeed("updatectl update") assert "nixos" in target.wait_until_succeeds("cat /nixos_1.txt", timeout=5) ''; }