Skip to content

Commit

Permalink
add regression test for #52
Browse files Browse the repository at this point in the history
  • Loading branch information
Lassulus committed Nov 10, 2022
1 parent c5973ae commit d61fd15
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 0 deletions.
50 changes: 50 additions & 0 deletions example/multi-device-no-deps.nix
Original file line number Diff line number Diff line change
@@ -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 changes: 12 additions & 0 deletions tests/multi-device-no-deps.nix
Original file line number Diff line number Diff line change
@@ -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");
'';
}

0 comments on commit d61fd15

Please sign in to comment.