disko/tests/module.nix

27 lines
772 B
Nix
Raw Normal View History

{ pkgs ? import <nixpkgs> { }
, diskoLib ? pkgs.callPackage ../lib { }
2022-10-29 11:19:29 +00:00
}:
diskoLib.testLib.makeDiskoTest {
inherit pkgs;
2023-02-21 16:19:39 +00:00
name = "module";
2022-10-29 11:19:29 +00:00
disko-config = ../example/complex.nix;
extraSystemConfig = {
networking.hostId = "8425e349";
2022-10-29 11:19:29 +00:00
fileSystems."/zfs_legacy_fs".options = [ "nofail" ]; # TODO find out why we need this!
};
testMode = "module";
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");
'';
extraInstallerConfig = {
2022-10-29 11:19:29 +00:00
boot.kernelModules = [ "dm-raid" "dm-mirror" ];
};
}