From d23fcb611ee27304e00e24175dda13d4fd790a9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Thu, 2 Feb 2023 14:49:20 +0100 Subject: [PATCH] add test for hybrid configuration --- example/hybrid.nix | 4 ++-- tests/hybrid.nix | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 tests/hybrid.nix diff --git a/example/hybrid.nix b/example/hybrid.nix index 061fa1e..ff11661 100644 --- a/example/hybrid.nix +++ b/example/hybrid.nix @@ -1,9 +1,9 @@ -{ disk, ... }: +{ disks ? [ "/dev/vda" ], ... }: { disk = { main = { type = "disk"; - device = disk; + device = builtins.elemAt disks 0; content = { type = "table"; format = "gpt"; diff --git a/tests/hybrid.nix b/tests/hybrid.nix new file mode 100644 index 0000000..077308f --- /dev/null +++ b/tests/hybrid.nix @@ -0,0 +1,9 @@ +{ pkgs ? (import { }) +, makeDiskoTest ? (pkgs.callPackage ./lib.nix { }).makeDiskoTest +}: +makeDiskoTest { + disko-config = ../example/hybrid.nix; + extraTestScript = '' + machine.succeed("mountpoint /"); + ''; +}