diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib.nix | 8 | ||||
-rw-r--r-- | tests/with-lib.nix | 11 |
2 files changed, 15 insertions, 4 deletions
diff --git a/tests/lib.nix b/tests/lib.nix index fb9d1e9..b3b3009 100644 --- a/tests/lib.nix +++ b/tests/lib.nix @@ -21,10 +21,10 @@ inherit (pkgs) system; }; disks = [ "/dev/vda" "/dev/vdb" "/dev/vdc" "/dev/vdd" "/dev/vde" "/dev/vdf" ]; - tsp-create = pkgs.writeScript "create" ((pkgs.callPackage ../. { }).create (disko-config { disks = builtins.tail disks; })); - tsp-mount = pkgs.writeScript "mount" ((pkgs.callPackage ../. { }).mount (disko-config { disks = builtins.tail disks; })); - tsp-config = (pkgs.callPackage ../. { }).config (disko-config { inherit disks; }); - num-disks = builtins.length (lib.attrNames (disko-config {}).disk); + tsp-create = pkgs.writeScript "create" ((pkgs.callPackage ../. { }).create (disko-config { disks = builtins.tail disks; inherit lib; })); + tsp-mount = pkgs.writeScript "mount" ((pkgs.callPackage ../. { }).mount (disko-config { disks = builtins.tail disks; inherit lib; })); + tsp-config = (pkgs.callPackage ../. { }).config (disko-config { inherit disks; inherit lib; }); + num-disks = builtins.length (lib.attrNames (disko-config { inherit lib; }).disk); installed-system = { modulesPath, ... }: { imports = [ tsp-config diff --git a/tests/with-lib.nix b/tests/with-lib.nix new file mode 100644 index 0000000..e94cf00 --- /dev/null +++ b/tests/with-lib.nix @@ -0,0 +1,11 @@ +{ pkgs ? (import <nixpkgs> { }) +, makeDiskoTest ? (pkgs.callPackage ./lib.nix { }).makeDiskoTest +}: +makeDiskoTest { + disko-config = import ../example/with-lib.nix; + extraTestScript = '' + machine.succeed("mountpoint /"); + ''; + efi = false; + grub-devices = [ "/dev/vdb" ]; +} |