mirror of
https://github.com/nix-community/disko.git
synced 2024-09-19 18:47:16 +03:00
20 lines
522 B
Nix
20 lines
522 B
Nix
|
{ 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]"
|
||
|
'
|
||
|
""");
|
||
|
'';
|
||
|
}
|