diff options
author | lassulus <lassulus@lassul.us> | 2022-11-10 09:46:55 +0100 |
---|---|---|
committer | lassulus <lassulus@lassul.us> | 2022-11-10 09:46:55 +0100 |
commit | d61fd1522b0477b376418edb9dc1ea336af29f89 (patch) | |
tree | bbedf262f16ee86a7e2ecfc5bd002b02f47e63b0 | |
parent | c5973aed4ed82106b0b8fb06be2ec70e94ebd532 (diff) |
add regression test for #52
-rw-r--r-- | example/multi-device-no-deps.nix | 50 | ||||
-rw-r--r-- | tests/multi-device-no-deps.nix | 12 |
2 files changed, 62 insertions, 0 deletions
diff --git a/example/multi-device-no-deps.nix b/example/multi-device-no-deps.nix new file mode 100644 index 0000000..2ad5f47 --- /dev/null +++ b/example/multi-device-no-deps.nix @@ -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"; + }; + } + ]; + }; + }; + }; +} diff --git a/tests/multi-device-no-deps.nix b/tests/multi-device-no-deps.nix new file mode 100644 index 0000000..ef1f7a8 --- /dev/null +++ b/tests/multi-device-no-deps.nix @@ -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"); + ''; +} |