mirror of
https://github.com/nix-community/disko.git
synced 2026-12-04 06:53:28 +01:00
luks: add test for FIDO2
This commit is contained in:
1 parent
640d1dd8e0
commit
a1b9822f03
1 file changed
+18
@@ -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")
|
||||||
|
'';
|
||||||
|
}
|
||||||
Reference in new issue
Block a user