From: Daan De Meyer Date: Mon, 18 Dec 2023 11:39:59 +0000 (+0100) Subject: tests: Use cryptsetup.passphrase for test_initrd_luks_lvm() as well X-Git-Tag: v20~55^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c6ffbc4432dc79f6e6d12a948b31eaee71a6fd68;p=thirdparty%2Fmkosi.git tests: Use cryptsetup.passphrase for test_initrd_luks_lvm() as well The credential now applies to all instances of systemd-crypsetup@, so let's use it for the LUKS+LVM test as well. --- diff --git a/tests/test_initrd.py b/tests/test_initrd.py index e201abc09..99623a672 100644 --- a/tests/test_initrd.py +++ b/tests/test_initrd.py @@ -35,13 +35,12 @@ def passphrase() -> Iterator[Path]: @pytest.fixture(scope="module") -def initrd(config: Image.Config, passphrase: Path) -> Iterator[Image]: +def initrd(config: Image.Config) -> Iterator[Image]: with Image( config, options=[ "--directory", "", "--include=mkosi-initrd/", - "--extra-tree", passphrase, ], ) as initrd: if initrd.config.distribution == Distribution.rhel_ubi: @@ -180,7 +179,7 @@ def test_initrd_luks_lvm(config: Image.Config, initrd: Image, passphrase: Path) "--kernel-command-line=systemd.unit=mkosi-check-and-shutdown.service", "--kernel-command-line=root=LABEL=root", "--kernel-command-line=rw", - f"--kernel-command-line=rd.luks.key=/{passphrase.name}", + "--credential=cryptsetup.passphrase=mkosi", "--incremental", "--ephemeral", "--qemu-firmware=linux",