tests: pass diskoLib instead of makeDiskoTest

This commit is contained in:
lassulus 2023-07-28 14:04:18 +02:00 committed by mergify[bot]
parent 5e253d949f
commit 04e227bab7
24 changed files with 71 additions and 72 deletions

View file

@ -1,7 +1,7 @@
{ pkgs ? (import <nixpkgs> { })
, makeDiskoTest ? (pkgs.callPackage ../lib { }).testLib.makeDiskoTest
{ pkgs ? import <nixpkgs> { }
, diskoLib ? pkgs.callPackage ../lib { }
}:
makeDiskoTest {
diskoLib.testLib.makeDiskoTest {
inherit pkgs;
name = "bcachefs";
disko-config = ../example/bcachefs.nix;

View file

@ -1,7 +1,7 @@
{ pkgs ? (import <nixpkgs> { })
, makeDiskoTest ? (pkgs.callPackage ../lib { }).testLib.makeDiskoTest
{ pkgs ? import <nixpkgs> { }
, diskoLib ? pkgs.callPackage ../lib { }
}:
makeDiskoTest {
diskoLib.testLib.makeDiskoTest {
inherit pkgs;
name = "boot-raid1";
disko-config = ../example/boot-raid1.nix;

View file

@ -1,7 +1,7 @@
{ pkgs ? (import <nixpkgs> { })
, makeDiskoTest ? (pkgs.callPackage ../lib { }).testLib.makeDiskoTest
{ pkgs ? import <nixpkgs> { }
, diskoLib ? pkgs.callPackage ../lib { }
}:
makeDiskoTest {
diskoLib.testLib.makeDiskoTest {
inherit pkgs;
name = "btrfs-subvolumes";
disko-config = ../example/btrfs-subvolumes.nix;

View file

@ -1,7 +1,7 @@
{ pkgs ? (import <nixpkgs> { })
, makeDiskoTest ? (pkgs.callPackage ../lib { }).testLib.makeDiskoTest
{ pkgs ? import <nixpkgs> { }
, diskoLib ? pkgs.callPackage ../lib { }
}:
makeDiskoTest {
diskoLib.testLib.makeDiskoTest {
inherit pkgs;
name = "cli";
disko-config = ../example/complex.nix;

View file

@ -1,7 +1,7 @@
{ pkgs ? (import <nixpkgs> { })
, makeDiskoTest ? (pkgs.callPackage ../lib { }).testLib.makeDiskoTest
{ pkgs ? import <nixpkgs> { }
, diskoLib ? pkgs.callPackage ../lib { }
}:
makeDiskoTest {
diskoLib.testLib.makeDiskoTest {
inherit pkgs;
name = "complex";
disko-config = ../example/complex.nix;

View file

@ -1,11 +1,10 @@
{ makeTest ? import <nixpkgs/nixos/tests/make-test-python.nix>
, eval-config ? import <nixpkgs/nixos/lib/eval-config.nix>
, pkgs ? (import <nixpkgs> { })
, pkgs ? import <nixpkgs> { }
}:
let
lib = pkgs.lib;
diskoLib = import ../lib { inherit lib makeTest eval-config; };
makeDiskoTest = diskoLib.testLib.makeDiskoTest;
allTestFilenames =
builtins.map (lib.removeSuffix ".nix") (
@ -14,7 +13,7 @@ let
(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;
};
in

View file

@ -1,7 +1,7 @@
{ pkgs ? (import <nixpkgs> { })
, makeDiskoTest ? (pkgs.callPackage ../lib { }).testLib.makeDiskoTest
{ pkgs ? import <nixpkgs> { }
, diskoLib ? pkgs.callPackage ../lib { }
}:
makeDiskoTest {
diskoLib.testLib.makeDiskoTest {
inherit pkgs;
name = "gpt-bios-compat";
disko-config = ../example/gpt-bios-compat.nix;

View file

@ -1,7 +1,7 @@
{ pkgs ? (import <nixpkgs> { })
, makeDiskoTest ? (pkgs.callPackage ../lib { }).testLib.makeDiskoTest
{ pkgs ? import <nixpkgs> { }
, diskoLib ? pkgs.callPackage ../lib { }
}:
makeDiskoTest {
diskoLib.testLib.makeDiskoTest {
inherit pkgs;
name = "hybrid-tmpfs-on-root";
disko-config = ../example/hybrid-tmpfs-on-root.nix;

View file

@ -1,7 +1,7 @@
{ pkgs ? (import <nixpkgs> { })
, makeDiskoTest ? (pkgs.callPackage ../lib { }).testLib.makeDiskoTest
{ pkgs ? import <nixpkgs> { }
, diskoLib ? pkgs.callPackage ../lib { }
}:
makeDiskoTest {
diskoLib.testLib.makeDiskoTest {
inherit pkgs;
name = "hybrid";
disko-config = ../example/hybrid.nix;

View file

@ -1,7 +1,7 @@
{ pkgs ? (import <nixpkgs> { })
, makeDiskoTest ? (pkgs.callPackage ../lib { }).testLib.makeDiskoTest
{ pkgs ? import <nixpkgs> { }
, diskoLib ? pkgs.callPackage ../lib { }
}:
makeDiskoTest {
diskoLib.testLib.makeDiskoTest {
inherit pkgs;
name = "legacy-table";
disko-config = ../example/legacy-table.nix;

View file

@ -1,7 +1,7 @@
{ pkgs ? (import <nixpkgs> { })
, makeDiskoTest ? (pkgs.callPackage ../lib { }).testLib.makeDiskoTest
{ pkgs ? import <nixpkgs> { }
, diskoLib ? pkgs.callPackage ../lib { }
}:
makeDiskoTest {
diskoLib.testLib.makeDiskoTest {
inherit pkgs;
name = "luks-btrfs-subvolumes";
disko-config = ../example/luks-btrfs-subvolumes.nix;

View file

@ -1,7 +1,7 @@
{ pkgs ? (import <nixpkgs> { })
, makeDiskoTest ? (pkgs.callPackage ../lib { }).testLib.makeDiskoTest
{ pkgs ? import <nixpkgs> { }
, diskoLib ? pkgs.callPackage ../lib { }
}:
makeDiskoTest {
diskoLib.testLib.makeDiskoTest {
inherit pkgs;
name = "luks-lvm";
disko-config = ../example/luks-lvm.nix;

View file

@ -1,7 +1,7 @@
{ pkgs ? (import <nixpkgs> { })
, makeDiskoTest ? (pkgs.callPackage ../lib { }).testLib.makeDiskoTest
{ pkgs ? import <nixpkgs> { }
, diskoLib ? pkgs.callPackage ../lib { }
}:
makeDiskoTest {
diskoLib.testLib.makeDiskoTest {
inherit pkgs;
name = "lvm-raid";
disko-config = ../example/lvm-raid.nix;

View file

@ -1,7 +1,7 @@
{ pkgs ? (import <nixpkgs> { })
, makeDiskoTest ? (pkgs.callPackage ../lib { }).testLib.makeDiskoTest
{ pkgs ? import <nixpkgs> { }
, diskoLib ? pkgs.callPackage ../lib { }
}:
makeDiskoTest {
diskoLib.testLib.makeDiskoTest {
inherit pkgs;
name = "lvm-sizes-sort";
disko-config = ../example/lvm-sizes-sort.nix;

View file

@ -1,7 +1,7 @@
{ pkgs ? (import <nixpkgs> { })
, makeDiskoTest ? (pkgs.callPackage ../lib { }).testLib.makeDiskoTest
{ pkgs ? import <nixpkgs> { }
, diskoLib ? pkgs.callPackage ../lib { }
}:
makeDiskoTest {
diskoLib.testLib.makeDiskoTest {
inherit pkgs;
name = "mdadm";
disko-config = ../example/mdadm.nix;

View file

@ -1,7 +1,7 @@
{ pkgs ? (import <nixpkgs> { })
, makeDiskoTest ? (pkgs.callPackage ../lib { }).testLib.makeDiskoTest
{ pkgs ? import <nixpkgs> { }
, diskoLib ? pkgs.callPackage ../lib { }
}:
makeDiskoTest {
diskoLib.testLib.makeDiskoTest {
inherit pkgs;
name = "module";
disko-config = ../example/complex.nix;

View file

@ -1,8 +1,8 @@
# this is a regression test for https://github.com/nix-community/disko/issues/52
{ pkgs ? (import <nixpkgs> { })
, makeDiskoTest ? (pkgs.callPackage ../lib { }).testLib.makeDiskoTest
{ pkgs ? import <nixpkgs> { }
, diskoLib ? pkgs.callPackage ../lib { }
}:
makeDiskoTest {
diskoLib.testLib.makeDiskoTest {
inherit pkgs;
name = "multi-device-no-deps";
disko-config = ../example/multi-device-no-deps.nix;

View file

@ -1,8 +1,8 @@
# this is a regression test for https://github.com/nix-community/disko/issues/52
{ pkgs ? (import <nixpkgs> { })
, makeDiskoTest ? (pkgs.callPackage ../lib { }).testLib.makeDiskoTest
{ pkgs ? import <nixpkgs> { }
, diskoLib ? pkgs.callPackage ../lib { }
}:
makeDiskoTest {
diskoLib.testLib.makeDiskoTest {
inherit pkgs;
name = "negative-size";
disko-config = ../example/negative-size.nix;

View file

@ -1,7 +1,7 @@
{ pkgs ? (import <nixpkgs> { })
, makeDiskoTest ? (pkgs.callPackage ../lib { }).testLib.makeDiskoTest
{ pkgs ? import <nixpkgs> { }
, diskoLib ? pkgs.callPackage ../lib { }
}:
makeDiskoTest {
diskoLib.testLib.makeDiskoTest {
inherit pkgs;
name = "simple-efi";
disko-config = ../example/simple-efi.nix;

View file

@ -1,7 +1,7 @@
{ pkgs ? (import <nixpkgs> { })
, makeDiskoTest ? (pkgs.callPackage ../lib { }).testLib.makeDiskoTest
{ pkgs ? import <nixpkgs> { }
, diskoLib ? pkgs.callPackage ../lib { }
}:
makeDiskoTest {
diskoLib.testLib.makeDiskoTest {
inherit pkgs;
name = "swap";
disko-config = ../example/swap.nix;

View file

@ -1,7 +1,7 @@
{ pkgs ? (import <nixpkgs> { })
, makeDiskoTest ? (pkgs.callPackage ../lib { }).testLib.makeDiskoTest
{ pkgs ? import <nixpkgs> { }
, diskoLib ? pkgs.callPackage ../lib { }
}:
makeDiskoTest {
diskoLib.testLib.makeDiskoTest {
inherit pkgs;
name = "tmpfs";
disko-config = ../example/tmpfs.nix;

View file

@ -1,7 +1,7 @@
{ pkgs ? (import <nixpkgs> { })
, makeDiskoTest ? (pkgs.callPackage ../lib { }).testLib.makeDiskoTest
{ pkgs ? import <nixpkgs> { }
, diskoLib ? pkgs.callPackage ../lib { }
}:
makeDiskoTest {
diskoLib.testLib.makeDiskoTest {
inherit pkgs;
name = "with-lib";
disko-config = ../example/with-lib.nix;

View file

@ -1,7 +1,7 @@
{ pkgs ? (import <nixpkgs> { })
, makeDiskoTest ? (pkgs.callPackage ../lib { }).testLib.makeDiskoTest
{ pkgs ? import <nixpkgs> { }
, diskoLib ? pkgs.callPackage ../lib { }
}:
makeDiskoTest {
diskoLib.testLib.makeDiskoTest {
inherit pkgs;
name = "zfs-over-legacy";
disko-config = ../example/zfs-over-legacy.nix;

View file

@ -1,7 +1,7 @@
{ pkgs ? (import <nixpkgs> { })
, makeDiskoTest ? (pkgs.callPackage ../lib { }).testLib.makeDiskoTest
{ pkgs ? import <nixpkgs> { }
, diskoLib ? pkgs.callPackage ../lib { }
}:
makeDiskoTest {
diskoLib.testLib.makeDiskoTest {
inherit pkgs;
name = "zfs";
disko-config = ../example/zfs.nix;