about summary refs log tree commit diff
path: root/nixos/tests/hibernate.nix
diff options
context:
space:
mode:
authorJanne Heß <janne@hess.ooo>2021-10-24 15:46:45 +0200
committerJanne Heß <janne@hess.ooo>2021-10-28 11:51:20 +0200
commit1640359f333d8af40bf1f3e7961943ea04c6d1a1 (patch)
tree4403716a678d84d81955d78757aae47bffa7d410 /nixos/tests/hibernate.nix
parent5f917bc2750d5a2474f817c3c8ef81997d4dd108 (diff)
nixos/test-runner: Fix execute() flakiness
Instead of using the magic string, we now just base64-encode everything
and check for a newline.
Diffstat (limited to 'nixos/tests/hibernate.nix')
-rw-r--r--nixos/tests/hibernate.nix4
1 files changed, 2 insertions, 2 deletions
diff --git a/nixos/tests/hibernate.nix b/nixos/tests/hibernate.nix
index f0d5da4a95ed2..508e7aa64c0df 100644
--- a/nixos/tests/hibernate.nix
+++ b/nixos/tests/hibernate.nix
@@ -95,7 +95,7 @@ in makeTest {
           "mkswap /dev/vda1 -L swap",
           # Install onto /mnt
           "nix-store --load-db < ${pkgs.closureInfo {rootPaths = [installedSystem];}}/registration",
-          "nixos-install --root /mnt --system ${installedSystem} --no-root-passwd",
+          "nixos-install --root /mnt --system ${installedSystem} --no-root-passwd --no-channel-copy >&2",
       )
       machine.shutdown()
 
@@ -110,7 +110,7 @@ in makeTest {
       )
 
       # Hibernate machine
-      hibernate.succeed("systemctl hibernate &")
+      hibernate.execute("systemctl hibernate &", check_return=False)
       hibernate.wait_for_shutdown()
 
       # Restore machine from hibernation, validate our ramfs file is there.