mirror of
https://github.com/TECHNOFAB11/disko.git
synced 2025-12-11 23:50:05 +01:00
tests: add lvm-sizes-sort test
This commit is contained in:
parent
e1d5b132d1
commit
0e942c56d7
3 changed files with 80 additions and 0 deletions
|
|
@ -11,6 +11,7 @@ status = [
|
||||||
"check hybrid-tmpfs-on-root [x86_64-linux]",
|
"check hybrid-tmpfs-on-root [x86_64-linux]",
|
||||||
"check luks-lvm [x86_64-linux]",
|
"check luks-lvm [x86_64-linux]",
|
||||||
"check lvm-raid [x86_64-linux]",
|
"check lvm-raid [x86_64-linux]",
|
||||||
|
"check lvm-sizes-sort [x86_64-linux]",
|
||||||
"check mdadm [x86_64-linux]",
|
"check mdadm [x86_64-linux]",
|
||||||
"check module [x86_64-linux]",
|
"check module [x86_64-linux]",
|
||||||
"check multi-device-no-deps [x86_64-linux]",
|
"check multi-device-no-deps [x86_64-linux]",
|
||||||
|
|
|
||||||
69
example/lvm-sizes-sort.nix
Normal file
69
example/lvm-sizes-sort.nix
Normal file
|
|
@ -0,0 +1,69 @@
|
||||||
|
{ disks ? [ "/dev/vdb" "/dev/vdc" ], ... }: {
|
||||||
|
disko.devices = {
|
||||||
|
disk = {
|
||||||
|
one = {
|
||||||
|
type = "disk";
|
||||||
|
device = builtins.elemAt disks 0;
|
||||||
|
content = {
|
||||||
|
type = "table";
|
||||||
|
format = "gpt";
|
||||||
|
partitions = [
|
||||||
|
{
|
||||||
|
name = "boot";
|
||||||
|
start = "0";
|
||||||
|
end = "100M";
|
||||||
|
fs-type = "fat32";
|
||||||
|
bootable = true;
|
||||||
|
content = {
|
||||||
|
type = "filesystem";
|
||||||
|
format = "vfat";
|
||||||
|
mountpoint = "/boot";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "primary";
|
||||||
|
start = "100M";
|
||||||
|
end = "100%";
|
||||||
|
content = {
|
||||||
|
type = "lvm_pv";
|
||||||
|
vg = "pool";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
lvm_vg = {
|
||||||
|
pool = {
|
||||||
|
type = "lvm_vg";
|
||||||
|
lvs = {
|
||||||
|
aaa = {
|
||||||
|
size = "1M";
|
||||||
|
};
|
||||||
|
zzz = {
|
||||||
|
size = "1M";
|
||||||
|
};
|
||||||
|
root = {
|
||||||
|
size = "100M";
|
||||||
|
content = {
|
||||||
|
type = "filesystem";
|
||||||
|
format = "ext4";
|
||||||
|
mountpoint = "/";
|
||||||
|
mountOptions = [
|
||||||
|
"defaults"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
home = {
|
||||||
|
size = "100%FREE";
|
||||||
|
content = {
|
||||||
|
type = "filesystem";
|
||||||
|
format = "ext4";
|
||||||
|
mountpoint = "/home";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
10
tests/lvm-sizes-sort.nix
Normal file
10
tests/lvm-sizes-sort.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
{ pkgs ? (import <nixpkgs> { })
|
||||||
|
, makeDiskoTest ? (pkgs.callPackage ./lib.nix { }).makeDiskoTest
|
||||||
|
}:
|
||||||
|
makeDiskoTest {
|
||||||
|
name = "lvm-sizes-sort";
|
||||||
|
disko-config = ../example/lvm-sizes-sort.nix;
|
||||||
|
extraTestScript = ''
|
||||||
|
machine.succeed("mountpoint /home");
|
||||||
|
'';
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue