lol

nixos/config/swap: check failure in swap file test

+4
+4
nixos/tests/swap-file-btrfs.nix
··· 32 32 33 33 testScript = '' 34 34 machine.wait_for_unit('var-swapfile.swap') 35 + # Ensure the swap file creation script ran to completion without failing when creating the swap file 36 + machine.fail("systemctl is-failed --quiet mkswap-var-swapfile.service") 35 37 machine.succeed("stat --file-system --format=%T /var/swapfile | grep btrfs") 36 38 # First run. Auto creation. 37 39 machine.succeed("swapon --show | grep /var/swapfile") ··· 41 43 42 44 # Second run. Use it as-is. 43 45 machine.wait_for_unit('var-swapfile.swap') 46 + # Ensure the swap file creation script ran to completion without failing when the swap file already exists 47 + machine.fail("systemctl is-failed --quiet mkswap-var-swapfile.service") 44 48 machine.succeed("swapon --show | grep /var/swapfile") 45 49 ''; 46 50 })