add legacy-table test & example

This commit is contained in:
lassulus 2023-07-17 23:14:32 +02:00 committed by mergify[bot]
parent b7f3ee8e14
commit 5ad79f43df
3 changed files with 52 additions and 0 deletions

View File

@ -10,6 +10,7 @@ queue_rules:
- check-success=check gpt-bios-compat [x86_64-linux]
- check-success=check hybrid [x86_64-linux]
- check-success=check hybrid-tmpfs-on-root [x86_64-linux]
- check-success=check legacy-table [x86_64-linux]
- check-success=check luks-lvm [x86_64-linux]
- check-success=check lvm-raid [x86_64-linux]
- check-success=check lvm-sizes-sort [x86_64-linux]

40
example/legacy-table.nix Normal file
View File

@ -0,0 +1,40 @@
{
disko.devices = {
disk = {
vdb = {
device = "/dev/sda";
type = "disk";
content = {
type = "table";
format = "gpt";
partitions = [
{
name = "ESP";
start = "1MiB";
end = "100MiB";
bootable = true;
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
}
{
name = "root";
start = "100MiB";
end = "100%";
part-type = "primary";
bootable = true;
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
};
}
];
};
};
};
};
}

11
tests/legacy-table.nix Normal file
View File

@ -0,0 +1,11 @@
{ pkgs ? (import <nixpkgs> { })
, makeDiskoTest ? (pkgs.callPackage ../lib { }).testLib.makeDiskoTest
}:
makeDiskoTest {
inherit pkgs;
name = "legacy-table";
disko-config = ../example/legacy-table.nix;
extraTestScript = ''
machine.succeed("mountpoint /");
'';
}