mirror of
https://github.com/nix-community/disko
synced 2024-11-10 06:14:14 +00:00
07f9727ce6
154: tests: adjust wait_for_text calls to work for systemd-initrd or old stage-1 r=Mic92 a=lilyinstarlight Co-authored-by: Lily Foster <lily@lily.flowers>
28 lines
826 B
Nix
28 lines
826 B
Nix
{ pkgs ? (import <nixpkgs> { })
|
|
, makeDiskoTest ? (pkgs.callPackage ./lib.nix { }).makeDiskoTest
|
|
}:
|
|
makeDiskoTest {
|
|
name = "complex";
|
|
disko-config = ../example/complex.nix;
|
|
extraConfig = {
|
|
fileSystems."/zfs_legacy_fs".options = [ "nofail" ]; # TODO find out why we need this!
|
|
};
|
|
extraTestScript = ''
|
|
machine.succeed("test -b /dev/zroot/zfs_testvolume");
|
|
machine.succeed("test -b /dev/md/raid1p1");
|
|
|
|
|
|
machine.succeed("mountpoint /zfs_fs");
|
|
machine.succeed("mountpoint /zfs_legacy_fs");
|
|
machine.succeed("mountpoint /ext4onzfs");
|
|
machine.succeed("mountpoint /ext4_on_lvm");
|
|
'';
|
|
enableOCR = true;
|
|
bootCommands = ''
|
|
machine.wait_for_text("[Pp]assphrase for")
|
|
machine.send_chars("secretsecret\n")
|
|
'';
|
|
extraConfig = {
|
|
boot.kernelModules = [ "dm-raid" "dm-mirror" ];
|
|
};
|
|
}
|