diff options
author | David Arnold <david.arnold@iohk.io> | 2022-11-05 15:17:35 -0500 |
---|---|---|
committer | lassulus <lassulus@lassul.us> | 2022-12-02 08:09:37 +0100 |
commit | efc80d7d89d40f54b76e0efcf83578c6b074906e (patch) | |
tree | 28597fea8468438ace7f1b3a1f271a1ddeb6d8d0 /tests | |
parent | aca927667acea7bb01dc8e72ee71f6548d9fd41b (diff) |
types: init swap
Diffstat (limited to 'tests')
-rw-r--r-- | tests/swap.nix | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/swap.nix b/tests/swap.nix new file mode 100644 index 0000000..fa090f8 --- /dev/null +++ b/tests/swap.nix @@ -0,0 +1,19 @@ +{ pkgs ? (import <nixpkgs> { }) +, makeDiskoTest ? (pkgs.callPackage ./lib.nix { }).makeDiskoTest +}: +makeDiskoTest { + disko-config = ../example/swap.nix; + extraTestScript = '' + machine.succeed("mountpoint /"); + machine.succeed("swapon --show >&2"); + machine.succeed(""" + lsblk --json | + ${pkgs.jq}/bin/jq -e '.blockdevices[] | + select(.name == "vda") | + .children[] | + select(.name == "vda3") | + .children[0].mountpoints[0] == "[SWAP]" + ' + """); + ''; +} |