disko/tests/luks-btrfs-subvolumes.nix

15 lines
487 B
Nix
Raw Normal View History

{ pkgs ? import <nixpkgs> { }
, diskoLib ? pkgs.callPackage ../lib { }
}:
diskoLib.testLib.makeDiskoTest {
inherit pkgs;
name = "luks-btrfs-subvolumes";
disko-config = ../example/luks-btrfs-subvolumes.nix;
extraTestScript = ''
2023-08-11 09:11:01 +03:00
machine.succeed("cryptsetup isLuks /dev/vda2");
machine.succeed("btrfs subvolume list / | grep -qs 'path nix$'");
machine.succeed("btrfs subvolume list / | grep -qs 'path home$'");
2023-09-13 00:03:16 +03:00
machine.succeed("test -e /.swapvol/swapfile");
'';
}