disko/tests/cli.nix
Jörg Thalheim a4bf32f6f0
Merge pull request #341 from nix-community/zfs-hostid
do not set networking.hostId in vm tests by default
2023-09-02 18:41:18 +02:00

35 lines
967 B
Nix

{ pkgs ? import <nixpkgs> { }
, diskoLib ? pkgs.callPackage ../lib { }
}:
diskoLib.testLib.makeDiskoTest {
inherit pkgs;
name = "cli";
disko-config = ../example/complex.nix;
extraSystemConfig = {
networking.hostId = "8425e349";
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!
};
testMode = "direct";
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");
'';
extraSystemConfig = {
imports = [
../module.nix
];
};
extraInstallerConfig = {
boot.kernelModules = [ "dm-raid" "dm-mirror" ];
imports = [
../module.nix
];
};
}