nixos/swraid: fix regression for old initrd and add test coverage

This commit is contained in:
Christian Theune 2023-09-10 17:16:33 +02:00
parent 14821ae8a8
commit 0e1a8027d1
2 changed files with 4 additions and 1 deletions

View File

@ -67,7 +67,7 @@ in {
$out/bin/mdadm --version
'';
extraFiles."/etc/mdadm.conf" = mdadm_conf;
extraFiles."/etc/mdadm.conf".source = pkgs.writeText "mdadm.conf" mdadm_conf.text;
systemd = {
contents."/etc/mdadm.conf".text = mdadm_conf.text;

View File

@ -32,6 +32,9 @@ import ./make-test-python.nix ({ lib, pkgs, ... }: {
};
specialisation.boot-swraid.configuration.virtualisation.rootDevice = "/dev/disk/by-label/testraid";
# This protects against a regression. We do not have to switch to it.
# It's sufficient to trigger its evaluation.
specialisation.build-old-initrd.configuration.boot.initrd.systemd.enable = lib.mkForce false;
};
testScript = ''