mirror of
https://github.com/TECHNOFAB11/disko.git
synced 2025-12-11 23:50:05 +01:00
add tests for module and cli
This commit is contained in:
parent
f1531fb4f3
commit
fec0b14fb5
14 changed files with 115 additions and 19 deletions
28
tests/cli.nix
Normal file
28
tests/cli.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{ pkgs ? (import <nixpkgs> { })
|
||||
, makeDiskoTest ? (pkgs.callPackage ./lib.nix { }).makeDiskoTest
|
||||
}:
|
||||
makeDiskoTest {
|
||||
disko-config = ../example/complex.nix;
|
||||
extraConfig = {
|
||||
fileSystems."/zfs_legacy_fs".options = [ "nofail" ]; # TODO find out why we need this!
|
||||
};
|
||||
testMode = "cli";
|
||||
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("Passphrase for")
|
||||
machine.send_chars("secret\n")
|
||||
'';
|
||||
extraConfig = {
|
||||
boot.kernelModules = [ "dm-raid" "dm-mirror" ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue