mirror of
https://github.com/nix-community/disko
synced 2024-11-10 06:14:14 +00:00
add long-device-name test & example
This commit is contained in:
parent
56f6d3d4af
commit
561579a631
2 changed files with 45 additions and 0 deletions
34
example/long-device-name.nix
Normal file
34
example/long-device-name.nix
Normal file
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
disko.devices = {
|
||||
disk = {
|
||||
vdb = {
|
||||
device = "/dev/disk/by-id/some-disk-id";
|
||||
name = "this-is-some-super-long-name-to-test-what-happens-when-the-name-is-too-long";
|
||||
type = "disk";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
ESP = {
|
||||
type = "EF00";
|
||||
size = "500M";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
};
|
||||
};
|
||||
root = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "ext4";
|
||||
mountpoint = "/";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
11
tests/long-device-name.nix
Normal file
11
tests/long-device-name.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{ pkgs ? import <nixpkgs> { }
|
||||
, diskoLib ? pkgs.callPackage ../lib { }
|
||||
}:
|
||||
diskoLib.testLib.makeDiskoTest {
|
||||
inherit pkgs;
|
||||
name = "long-device-name";
|
||||
disko-config = ../example/long-device-name.nix;
|
||||
extraTestScript = ''
|
||||
machine.succeed("mountpoint /");
|
||||
'';
|
||||
}
|
Loading…
Reference in a new issue