mirror of
https://github.com/TECHNOFAB11/disko.git
synced 2025-12-11 23:50:05 +01:00
types: init swap
This commit is contained in:
parent
aca927667a
commit
efc80d7d89
4 changed files with 131 additions and 3 deletions
19
tests/swap.nix
Normal file
19
tests/swap.nix
Normal file
|
|
@ -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]"
|
||||
'
|
||||
""");
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue