mirror of
https://github.com/nix-community/disko.git
synced 2024-09-17 09:37:17 +03:00
add regression test for #52
This commit is contained in:
parent
c5973aed4e
commit
d61fd1522b
50
example/multi-device-no-deps.nix
Normal file
50
example/multi-device-no-deps.nix
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
{ disks ? [ "/dev/vdb" "/dev/vdc" ], ... }: {
|
||||||
|
disk = {
|
||||||
|
disk0 = {
|
||||||
|
device = builtins.elemAt disks 0;
|
||||||
|
type = "disk";
|
||||||
|
content = {
|
||||||
|
type = "table";
|
||||||
|
format = "gpt";
|
||||||
|
partitions = [
|
||||||
|
{
|
||||||
|
name = "nix";
|
||||||
|
type = "partition";
|
||||||
|
part-type = "primary";
|
||||||
|
start = "0%";
|
||||||
|
end = "100%";
|
||||||
|
bootable = true;
|
||||||
|
content = {
|
||||||
|
type = "filesystem";
|
||||||
|
format = "ext4";
|
||||||
|
mountpoint = "/a";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
disk1 = {
|
||||||
|
device = builtins.elemAt disks 1;
|
||||||
|
type = "disk";
|
||||||
|
content = {
|
||||||
|
type = "table";
|
||||||
|
format = "gpt";
|
||||||
|
partitions = [
|
||||||
|
{
|
||||||
|
name = "root";
|
||||||
|
type = "partition";
|
||||||
|
part-type = "primary";
|
||||||
|
start = "0%";
|
||||||
|
end = "100%";
|
||||||
|
bootable = true;
|
||||||
|
content = {
|
||||||
|
type = "filesystem";
|
||||||
|
format = "ext4";
|
||||||
|
mountpoint = "/b";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
12
tests/multi-device-no-deps.nix
Normal file
12
tests/multi-device-no-deps.nix
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# this is a regression test for https://github.com/nix-community/disko/issues/52
|
||||||
|
{ pkgs ? (import <nixpkgs> { })
|
||||||
|
, makeDiskoTest ? (pkgs.callPackage ./lib.nix { }).makeDiskoTest
|
||||||
|
}:
|
||||||
|
makeDiskoTest {
|
||||||
|
disko-config = ../example/multi-device-no-deps.nix;
|
||||||
|
testBoot = false;
|
||||||
|
extraTestScript = ''
|
||||||
|
machine.succeed("mountpoint /mnt/a");
|
||||||
|
machine.succeed("mountpoint /mnt/b");
|
||||||
|
'';
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user