mirror of
https://github.com/nix-community/disko.git
synced 2026-12-02 22:13:28 +01:00
luks: add test for multiple partitions and fix handling if on same disk (#1281)
This PR addresses the handling of multiple LUKS partitions on the same disk and adds a corresponding test case. - **Fix:** The core logic for handling multiple LUKS partitions on a single disk was improved to ensure correct partition mapping and unlocking. (Implemented using a custom pi agent and the **mimo-v2.5** model). - **Tests:** Added `luks-multiple` test to verify the behavior of multiple LUKS partitions on the same disk. (Tests written by me). Reproduces and fixes #1263
This commit is contained in:
4 files changed
+101
-14
No files matched your search
@@ -0,0 +1,22 @@
|
||||
{
|
||||
pkgs ? import <nixpkgs> { },
|
||||
diskoLib ? pkgs.callPackage ../lib { },
|
||||
}:
|
||||
diskoLib.testLib.makeDiskoTest {
|
||||
inherit pkgs;
|
||||
name = "luks-multiple";
|
||||
disko-config = ../example/luks-multiple.nix;
|
||||
testBoot = false;
|
||||
postUnmountPreMount = ''
|
||||
machine.fail("mountpoint /mnt/");
|
||||
machine.fail("mountpoint /mnt/home");
|
||||
machine.fail("${pkgs.cryptsetup}/bin/cryptsetup status root")
|
||||
machine.fail("${pkgs.cryptsetup}/bin/cryptsetup status home")
|
||||
'';
|
||||
postMount = ''
|
||||
machine.succeed("mountpoint /mnt/");
|
||||
machine.succeed("mountpoint /mnt/home");
|
||||
machine.succeed("${pkgs.cryptsetup}/bin/cryptsetup status root")
|
||||
machine.succeed("${pkgs.cryptsetup}/bin/cryptsetup status home")
|
||||
'';
|
||||
}
|
||||
Reference in new issue
Block a user