summary refs log tree commit diff stats
path: root/tests.nix
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-12-20 13:58:21 +0100
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-12-20 13:58:21 +0100
commit33639143ea50404a04bc4c454435aff1bd79dd4b (patch)
treeede4b6832bb86ac30281fc22700ae1fe40658f37 /tests.nix
parentfix(treewide): Update to nixos release 24.11 (diff)
downloadnixos-server-33639143ea50404a04bc4c454435aff1bd79dd4b.tar.gz
nixos-server-33639143ea50404a04bc4c454435aff1bd79dd4b.zip
refactor({modules,test}): Migrate to a `by-name` structure
Diffstat (limited to '')
-rw-r--r--tests.nix28
1 files changed, 0 insertions, 28 deletions
diff --git a/tests.nix b/tests.nix
deleted file mode 100644
index d91a9c9..0000000
--- a/tests.nix
+++ /dev/null
@@ -1,28 +0,0 @@
-{
-  pkgs,
-  lib,
-  specialArgs,
-}: let
-  # for `nix eval --file` (as it does not support args) use:
-  # ```
-  # specialArgs = {};
-  # pkgs = (builtins.getFlake "nixpkgs").legacyPackages."x86_64-linux";
-  # inherit (pkgs) lib;
-  # ```
-  # instead of the function arguments above.
-  importTests' = test: let
-    basename = builtins.baseNameOf test;
-    testName = builtins.baseNameOf (lib.strings.removeSuffix "/${basename}" "${builtins.toString test}");
-  in {
-    name = "${testName}";
-    value = pkgs.callPackage test specialArgs;
-  };
-
-  importTests = dir:
-    builtins.listToAttrs (builtins.map importTests' (
-      lib.fileset.toList (lib.fileset.fileFilter (file: file.name == "test.nix") dir)
-    ));
-
-  tests = importTests ./tests;
-in
-  tests