tests: get rid of OCR, generate keyFile in preDevice

This commit is contained in:
lassulus committed 2023-07-11 09:12:45 +02:00
1 parent 86e90d0fdb
commit b22ebd5ecd
6 files changed
+4 -24

No files matched your search

-4
View File
@@ -18,10 +18,6 @@ makeDiskoTest {
machine.succeed("mountpoint /ext4onzfs");
machine.succeed("mountpoint /ext4_on_lvm");
'';
bootCommands = ''
machine.wait_for_console_text("vda")
machine.send_console("secretsecret\n")
'';
extraConfig = {
boot.kernelModules = [ "dm-raid" "dm-mirror" ];
};
-4
View File
@@ -17,10 +17,6 @@ makeDiskoTest {
machine.succeed("mountpoint /ext4onzfs");
machine.succeed("mountpoint /ext4_on_lvm");
'';
bootCommands = ''
machine.wait_for_console_text("vda")
machine.send_console("secretsecret\n")
'';
extraConfig = {
boot.kernelModules = [ "dm-raid" "dm-mirror" ];
};
+3 -3
View File
@@ -12,7 +12,6 @@
, extraConfig ? { }
, grub-devices ? [ "nodev" ]
, efi ? true
, enableOCR ? false
, postDisko ? ""
, testMode ? "module" # can be one of direct module cli
, testBoot ? true # if we actually want to test booting or just create/mount
@@ -55,8 +54,10 @@
documentation.enable = false;
hardware.enableAllFirmware = lib.mkForce false;
networking.hostId = "8425e349"; # from profiles/base.nix, needed for zfs
boot.kernelParams = lib.mkIf enableOCR [ "console=tty0" ]; # needed for OCR
boot.zfs.devNodes = "/dev/disk/by-uuid"; # needed because /dev/disk/by-id is empty in qemu-vms
boot.initrd.preDeviceCommands = ''
echo -n 'secretsecret' > /tmp/secret.key
'';
boot.consoleLogLevel = lib.mkForce 100;
boot.loader.grub = {
@@ -75,7 +76,6 @@
makeTest' {
name = "disko-${name}";
inherit enableOCR;
nodes.machine = { pkgs, modulesPath, ... }: {
imports = [
(lib.optionalAttrs (testMode == "module") {
+1 -4
View File
@@ -4,12 +4,9 @@
makeDiskoTest {
name = "luks-lvm";
disko-config = ../example/luks-lvm.nix;
extraConfig.boot.initrd.luks.devices.crypted.preLVM = false;
extraTestScript = ''
machine.succeed("cryptsetup isLuks /dev/vda2");
machine.succeed("mountpoint /home");
'';
bootCommands = ''
machine.wait_for_console_text("vda")
machine.send_console("secretsecret\n")
'';
}
-4
View File
@@ -18,10 +18,6 @@ makeDiskoTest {
machine.succeed("mountpoint /ext4onzfs");
machine.succeed("mountpoint /ext4_on_lvm");
'';
bootCommands = ''
machine.wait_for_console_text("vda")
machine.send_console("secretsecret\n")
'';
extraConfig = {
boot.kernelModules = [ "dm-raid" "dm-mirror" ];
};
-5
View File
@@ -8,11 +8,6 @@ makeDiskoTest {
fileSystems."/zfs_legacy_fs".options = [ "nofail" ]; # TODO find out why we need this!
boot.zfs.requestEncryptionCredentials = true;
};
enableOCR = true;
bootCommands = ''
machine.wait_for_text("passphrase for")
machine.send_chars("secretsecret\n")
'';
extraTestScript = ''
machine.succeed("test -b /dev/zvol/zroot/zfs_testvolume");