luks: add test for FIDO2

This commit is contained in:
Michael Hoang
2026-05-25 10:55:36 +02:00
parent 640d1dd8e0
commit a1b9822f03
+18
View File
@@ -0,0 +1,18 @@
{
pkgs ? import <nixpkgs> { },
diskoLib ? pkgs.callPackage ../lib { },
}:
diskoLib.testLib.makeDiskoTest {
inherit pkgs;
name = "luks-fido2";
disko-config = ../example/luks-fido2.nix;
enableCanokey = true;
extraTestScript = ''
machine.succeed("cryptsetup isLuks /dev/vda2");
machine.succeed("mountpoint /");
machine.succeed("systemd-cryptenroll /dev/vda2 | grep -qw fido2")
# Recovery should be disabled
machine.fail("systemd-cryptenroll /dev/vda2 | grep -qw recovery")
'';
}