about summary refs log tree commit diff
path: root/nixos/tests
diff options
context:
space:
mode:
authorJared Baur <jaredbaur@fastmail.com>2024-01-31 09:16:04 -0800
committerJared Baur <jaredbaur@fastmail.com>2024-01-31 09:16:04 -0800
commit514bfa6674600e08c321b9efdab807a14835c4ff (patch)
tree7a1815d3c15f156851f2833c664c8cff0db276d3 /nixos/tests
parent50866dc20fb85063f1d4e103b11530092c490d03 (diff)
nixos/sysupdate: fix systemd-sysupdate test
The test fails when the `Target`'s parent directories don't exist. For
the purpose of this test though, we can just download it to the root
directory for simplicity.
Diffstat (limited to 'nixos/tests')
-rw-r--r--nixos/tests/systemd-sysupdate.nix14
1 files changed, 7 insertions, 7 deletions
diff --git a/nixos/tests/systemd-sysupdate.nix b/nixos/tests/systemd-sysupdate.nix
index 37811605dbb2b..6592764c9ff46 100644
--- a/nixos/tests/systemd-sysupdate.nix
+++ b/nixos/tests/systemd-sysupdate.nix
@@ -23,8 +23,8 @@ in
             mkdir -p $out
             cd $out
 
-            echo "nixos" > nixos_1.efi
-            sha256sum nixos_1.efi > SHA256SUMS
+            echo "nixos" > nixos_1.txt
+            sha256sum nixos_1.txt > SHA256SUMS
 
             export GNUPGHOME="$(mktemp -d)"
             cp -R ${gpgKeyring}/* $GNUPGHOME
@@ -39,15 +39,15 @@ in
       systemd.sysupdate = {
         enable = true;
         transfers = {
-          "uki" = {
+          "text-file" = {
             Source = {
               Type = "url-file";
               Path = "http://server/";
-              MatchPattern = "nixos_@v.efi";
+              MatchPattern = "nixos_@v.txt";
             };
             Target = {
-              Path = "/boot/EFI/Linux";
-              MatchPattern = "nixos_@v.efi";
+              Path = "/";
+              MatchPattern = [ "nixos_@v.txt" ];
             };
           };
         };
@@ -61,6 +61,6 @@ in
     server.wait_for_unit("nginx.service")
 
     target.succeed("systemctl start systemd-sysupdate")
-    assert "nixos" in target.wait_until_succeeds("cat /boot/EFI/Linux/nixos_1.efi", timeout=5)
+    assert "nixos" in target.wait_until_succeeds("cat /nixos_1.txt", timeout=5)
   '';
 }