mirror of
https://github.com/nix-community/disko
synced 2024-11-10 06:14:14 +00:00
tests: pass diskoLib instead of makeDiskoTest
This commit is contained in:
parent
5e253d949f
commit
04e227bab7
24 changed files with 71 additions and 72 deletions
|
@ -1,7 +1,7 @@
|
||||||
{ pkgs ? (import <nixpkgs> { })
|
{ pkgs ? import <nixpkgs> { }
|
||||||
, makeDiskoTest ? (pkgs.callPackage ../lib { }).testLib.makeDiskoTest
|
, diskoLib ? pkgs.callPackage ../lib { }
|
||||||
}:
|
}:
|
||||||
makeDiskoTest {
|
diskoLib.testLib.makeDiskoTest {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
name = "bcachefs";
|
name = "bcachefs";
|
||||||
disko-config = ../example/bcachefs.nix;
|
disko-config = ../example/bcachefs.nix;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{ pkgs ? (import <nixpkgs> { })
|
{ pkgs ? import <nixpkgs> { }
|
||||||
, makeDiskoTest ? (pkgs.callPackage ../lib { }).testLib.makeDiskoTest
|
, diskoLib ? pkgs.callPackage ../lib { }
|
||||||
}:
|
}:
|
||||||
makeDiskoTest {
|
diskoLib.testLib.makeDiskoTest {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
name = "boot-raid1";
|
name = "boot-raid1";
|
||||||
disko-config = ../example/boot-raid1.nix;
|
disko-config = ../example/boot-raid1.nix;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{ pkgs ? (import <nixpkgs> { })
|
{ pkgs ? import <nixpkgs> { }
|
||||||
, makeDiskoTest ? (pkgs.callPackage ../lib { }).testLib.makeDiskoTest
|
, diskoLib ? pkgs.callPackage ../lib { }
|
||||||
}:
|
}:
|
||||||
makeDiskoTest {
|
diskoLib.testLib.makeDiskoTest {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
name = "btrfs-subvolumes";
|
name = "btrfs-subvolumes";
|
||||||
disko-config = ../example/btrfs-subvolumes.nix;
|
disko-config = ../example/btrfs-subvolumes.nix;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{ pkgs ? (import <nixpkgs> { })
|
{ pkgs ? import <nixpkgs> { }
|
||||||
, makeDiskoTest ? (pkgs.callPackage ../lib { }).testLib.makeDiskoTest
|
, diskoLib ? pkgs.callPackage ../lib { }
|
||||||
}:
|
}:
|
||||||
makeDiskoTest {
|
diskoLib.testLib.makeDiskoTest {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
name = "cli";
|
name = "cli";
|
||||||
disko-config = ../example/complex.nix;
|
disko-config = ../example/complex.nix;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{ pkgs ? (import <nixpkgs> { })
|
{ pkgs ? import <nixpkgs> { }
|
||||||
, makeDiskoTest ? (pkgs.callPackage ../lib { }).testLib.makeDiskoTest
|
, diskoLib ? pkgs.callPackage ../lib { }
|
||||||
}:
|
}:
|
||||||
makeDiskoTest {
|
diskoLib.testLib.makeDiskoTest {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
name = "complex";
|
name = "complex";
|
||||||
disko-config = ../example/complex.nix;
|
disko-config = ../example/complex.nix;
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
{ makeTest ? import <nixpkgs/nixos/tests/make-test-python.nix>
|
{ makeTest ? import <nixpkgs/nixos/tests/make-test-python.nix>
|
||||||
, eval-config ? import <nixpkgs/nixos/lib/eval-config.nix>
|
, eval-config ? import <nixpkgs/nixos/lib/eval-config.nix>
|
||||||
, pkgs ? (import <nixpkgs> { })
|
, pkgs ? import <nixpkgs> { }
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
lib = pkgs.lib;
|
lib = pkgs.lib;
|
||||||
diskoLib = import ../lib { inherit lib makeTest eval-config; };
|
diskoLib = import ../lib { inherit lib makeTest eval-config; };
|
||||||
makeDiskoTest = diskoLib.testLib.makeDiskoTest;
|
|
||||||
|
|
||||||
allTestFilenames =
|
allTestFilenames =
|
||||||
builtins.map (lib.removeSuffix ".nix") (
|
builtins.map (lib.removeSuffix ".nix") (
|
||||||
|
@ -14,7 +13,7 @@ let
|
||||||
(lib.attrNames (builtins.readDir ./.))
|
(lib.attrNames (builtins.readDir ./.))
|
||||||
);
|
);
|
||||||
|
|
||||||
allTests = lib.genAttrs allTestFilenames (test: import (./. + "/${test}.nix") { inherit makeDiskoTest pkgs; }) // {
|
allTests = lib.genAttrs allTestFilenames (test: import (./. + "/${test}.nix") { inherit diskoLib pkgs; }) // {
|
||||||
standalone = (pkgs.nixos [ ../example/stand-alone/configuration.nix ]).config.system.build.toplevel;
|
standalone = (pkgs.nixos [ ../example/stand-alone/configuration.nix ]).config.system.build.toplevel;
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{ pkgs ? (import <nixpkgs> { })
|
{ pkgs ? import <nixpkgs> { }
|
||||||
, makeDiskoTest ? (pkgs.callPackage ../lib { }).testLib.makeDiskoTest
|
, diskoLib ? pkgs.callPackage ../lib { }
|
||||||
}:
|
}:
|
||||||
makeDiskoTest {
|
diskoLib.testLib.makeDiskoTest {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
name = "gpt-bios-compat";
|
name = "gpt-bios-compat";
|
||||||
disko-config = ../example/gpt-bios-compat.nix;
|
disko-config = ../example/gpt-bios-compat.nix;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{ pkgs ? (import <nixpkgs> { })
|
{ pkgs ? import <nixpkgs> { }
|
||||||
, makeDiskoTest ? (pkgs.callPackage ../lib { }).testLib.makeDiskoTest
|
, diskoLib ? pkgs.callPackage ../lib { }
|
||||||
}:
|
}:
|
||||||
makeDiskoTest {
|
diskoLib.testLib.makeDiskoTest {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
name = "hybrid-tmpfs-on-root";
|
name = "hybrid-tmpfs-on-root";
|
||||||
disko-config = ../example/hybrid-tmpfs-on-root.nix;
|
disko-config = ../example/hybrid-tmpfs-on-root.nix;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{ pkgs ? (import <nixpkgs> { })
|
{ pkgs ? import <nixpkgs> { }
|
||||||
, makeDiskoTest ? (pkgs.callPackage ../lib { }).testLib.makeDiskoTest
|
, diskoLib ? pkgs.callPackage ../lib { }
|
||||||
}:
|
}:
|
||||||
makeDiskoTest {
|
diskoLib.testLib.makeDiskoTest {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
name = "hybrid";
|
name = "hybrid";
|
||||||
disko-config = ../example/hybrid.nix;
|
disko-config = ../example/hybrid.nix;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{ pkgs ? (import <nixpkgs> { })
|
{ pkgs ? import <nixpkgs> { }
|
||||||
, makeDiskoTest ? (pkgs.callPackage ../lib { }).testLib.makeDiskoTest
|
, diskoLib ? pkgs.callPackage ../lib { }
|
||||||
}:
|
}:
|
||||||
makeDiskoTest {
|
diskoLib.testLib.makeDiskoTest {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
name = "legacy-table";
|
name = "legacy-table";
|
||||||
disko-config = ../example/legacy-table.nix;
|
disko-config = ../example/legacy-table.nix;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{ pkgs ? (import <nixpkgs> { })
|
{ pkgs ? import <nixpkgs> { }
|
||||||
, makeDiskoTest ? (pkgs.callPackage ../lib { }).testLib.makeDiskoTest
|
, diskoLib ? pkgs.callPackage ../lib { }
|
||||||
}:
|
}:
|
||||||
makeDiskoTest {
|
diskoLib.testLib.makeDiskoTest {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
name = "luks-btrfs-subvolumes";
|
name = "luks-btrfs-subvolumes";
|
||||||
disko-config = ../example/luks-btrfs-subvolumes.nix;
|
disko-config = ../example/luks-btrfs-subvolumes.nix;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{ pkgs ? (import <nixpkgs> { })
|
{ pkgs ? import <nixpkgs> { }
|
||||||
, makeDiskoTest ? (pkgs.callPackage ../lib { }).testLib.makeDiskoTest
|
, diskoLib ? pkgs.callPackage ../lib { }
|
||||||
}:
|
}:
|
||||||
makeDiskoTest {
|
diskoLib.testLib.makeDiskoTest {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
name = "luks-lvm";
|
name = "luks-lvm";
|
||||||
disko-config = ../example/luks-lvm.nix;
|
disko-config = ../example/luks-lvm.nix;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{ pkgs ? (import <nixpkgs> { })
|
{ pkgs ? import <nixpkgs> { }
|
||||||
, makeDiskoTest ? (pkgs.callPackage ../lib { }).testLib.makeDiskoTest
|
, diskoLib ? pkgs.callPackage ../lib { }
|
||||||
}:
|
}:
|
||||||
makeDiskoTest {
|
diskoLib.testLib.makeDiskoTest {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
name = "lvm-raid";
|
name = "lvm-raid";
|
||||||
disko-config = ../example/lvm-raid.nix;
|
disko-config = ../example/lvm-raid.nix;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{ pkgs ? (import <nixpkgs> { })
|
{ pkgs ? import <nixpkgs> { }
|
||||||
, makeDiskoTest ? (pkgs.callPackage ../lib { }).testLib.makeDiskoTest
|
, diskoLib ? pkgs.callPackage ../lib { }
|
||||||
}:
|
}:
|
||||||
makeDiskoTest {
|
diskoLib.testLib.makeDiskoTest {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
name = "lvm-sizes-sort";
|
name = "lvm-sizes-sort";
|
||||||
disko-config = ../example/lvm-sizes-sort.nix;
|
disko-config = ../example/lvm-sizes-sort.nix;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{ pkgs ? (import <nixpkgs> { })
|
{ pkgs ? import <nixpkgs> { }
|
||||||
, makeDiskoTest ? (pkgs.callPackage ../lib { }).testLib.makeDiskoTest
|
, diskoLib ? pkgs.callPackage ../lib { }
|
||||||
}:
|
}:
|
||||||
makeDiskoTest {
|
diskoLib.testLib.makeDiskoTest {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
name = "mdadm";
|
name = "mdadm";
|
||||||
disko-config = ../example/mdadm.nix;
|
disko-config = ../example/mdadm.nix;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{ pkgs ? (import <nixpkgs> { })
|
{ pkgs ? import <nixpkgs> { }
|
||||||
, makeDiskoTest ? (pkgs.callPackage ../lib { }).testLib.makeDiskoTest
|
, diskoLib ? pkgs.callPackage ../lib { }
|
||||||
}:
|
}:
|
||||||
makeDiskoTest {
|
diskoLib.testLib.makeDiskoTest {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
name = "module";
|
name = "module";
|
||||||
disko-config = ../example/complex.nix;
|
disko-config = ../example/complex.nix;
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
# this is a regression test for https://github.com/nix-community/disko/issues/52
|
# this is a regression test for https://github.com/nix-community/disko/issues/52
|
||||||
{ pkgs ? (import <nixpkgs> { })
|
{ pkgs ? import <nixpkgs> { }
|
||||||
, makeDiskoTest ? (pkgs.callPackage ../lib { }).testLib.makeDiskoTest
|
, diskoLib ? pkgs.callPackage ../lib { }
|
||||||
}:
|
}:
|
||||||
makeDiskoTest {
|
diskoLib.testLib.makeDiskoTest {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
name = "multi-device-no-deps";
|
name = "multi-device-no-deps";
|
||||||
disko-config = ../example/multi-device-no-deps.nix;
|
disko-config = ../example/multi-device-no-deps.nix;
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
# this is a regression test for https://github.com/nix-community/disko/issues/52
|
# this is a regression test for https://github.com/nix-community/disko/issues/52
|
||||||
{ pkgs ? (import <nixpkgs> { })
|
{ pkgs ? import <nixpkgs> { }
|
||||||
, makeDiskoTest ? (pkgs.callPackage ../lib { }).testLib.makeDiskoTest
|
, diskoLib ? pkgs.callPackage ../lib { }
|
||||||
}:
|
}:
|
||||||
makeDiskoTest {
|
diskoLib.testLib.makeDiskoTest {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
name = "negative-size";
|
name = "negative-size";
|
||||||
disko-config = ../example/negative-size.nix;
|
disko-config = ../example/negative-size.nix;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{ pkgs ? (import <nixpkgs> { })
|
{ pkgs ? import <nixpkgs> { }
|
||||||
, makeDiskoTest ? (pkgs.callPackage ../lib { }).testLib.makeDiskoTest
|
, diskoLib ? pkgs.callPackage ../lib { }
|
||||||
}:
|
}:
|
||||||
makeDiskoTest {
|
diskoLib.testLib.makeDiskoTest {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
name = "simple-efi";
|
name = "simple-efi";
|
||||||
disko-config = ../example/simple-efi.nix;
|
disko-config = ../example/simple-efi.nix;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{ pkgs ? (import <nixpkgs> { })
|
{ pkgs ? import <nixpkgs> { }
|
||||||
, makeDiskoTest ? (pkgs.callPackage ../lib { }).testLib.makeDiskoTest
|
, diskoLib ? pkgs.callPackage ../lib { }
|
||||||
}:
|
}:
|
||||||
makeDiskoTest {
|
diskoLib.testLib.makeDiskoTest {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
name = "swap";
|
name = "swap";
|
||||||
disko-config = ../example/swap.nix;
|
disko-config = ../example/swap.nix;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{ pkgs ? (import <nixpkgs> { })
|
{ pkgs ? import <nixpkgs> { }
|
||||||
, makeDiskoTest ? (pkgs.callPackage ../lib { }).testLib.makeDiskoTest
|
, diskoLib ? pkgs.callPackage ../lib { }
|
||||||
}:
|
}:
|
||||||
makeDiskoTest {
|
diskoLib.testLib.makeDiskoTest {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
name = "tmpfs";
|
name = "tmpfs";
|
||||||
disko-config = ../example/tmpfs.nix;
|
disko-config = ../example/tmpfs.nix;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{ pkgs ? (import <nixpkgs> { })
|
{ pkgs ? import <nixpkgs> { }
|
||||||
, makeDiskoTest ? (pkgs.callPackage ../lib { }).testLib.makeDiskoTest
|
, diskoLib ? pkgs.callPackage ../lib { }
|
||||||
}:
|
}:
|
||||||
makeDiskoTest {
|
diskoLib.testLib.makeDiskoTest {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
name = "with-lib";
|
name = "with-lib";
|
||||||
disko-config = ../example/with-lib.nix;
|
disko-config = ../example/with-lib.nix;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{ pkgs ? (import <nixpkgs> { })
|
{ pkgs ? import <nixpkgs> { }
|
||||||
, makeDiskoTest ? (pkgs.callPackage ../lib { }).testLib.makeDiskoTest
|
, diskoLib ? pkgs.callPackage ../lib { }
|
||||||
}:
|
}:
|
||||||
makeDiskoTest {
|
diskoLib.testLib.makeDiskoTest {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
name = "zfs-over-legacy";
|
name = "zfs-over-legacy";
|
||||||
disko-config = ../example/zfs-over-legacy.nix;
|
disko-config = ../example/zfs-over-legacy.nix;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{ pkgs ? (import <nixpkgs> { })
|
{ pkgs ? import <nixpkgs> { }
|
||||||
, makeDiskoTest ? (pkgs.callPackage ../lib { }).testLib.makeDiskoTest
|
, diskoLib ? pkgs.callPackage ../lib { }
|
||||||
}:
|
}:
|
||||||
makeDiskoTest {
|
diskoLib.testLib.makeDiskoTest {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
name = "zfs";
|
name = "zfs";
|
||||||
disko-config = ../example/zfs.nix;
|
disko-config = ../example/zfs.nix;
|
||||||
|
|
Loading…
Reference in a new issue