disko/tests/cli.nix

35 lines
964 B
Nix
Raw Normal View History

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