1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-08 11:36:05 +01:00

tests: add basic integration tests

This introduces some rudimentary integration tests using the NixOS
test framework. The intent is to better catch regressions when doing
more elaborate changes that may affect overall Home Manager behavior.
Note, the tests are currently not run automatically.
This commit is contained in:
Robert Helgesson 2024-02-12 23:35:55 +01:00
parent 7889bfb475
commit 043ba285c6
No known key found for this signature in database
GPG key ID: 96E745BD17AA17ED
8 changed files with 357 additions and 1 deletions

View file

@ -118,6 +118,11 @@
tests = import ./tests { inherit pkgs; };
renameTestPkg = n: lib.nameValuePair "test-${n}";
in lib.mapAttrs' renameTestPkg tests.build;
integrationTestPackages = let
tests = import ./tests/integration { inherit pkgs; };
renameTestPkg = n: lib.nameValuePair "integration-test-${n}";
in lib.mapAttrs' renameTestPkg tests;
in {
default = hmPkg;
home-manager = hmPkg;
@ -125,7 +130,7 @@
docs-html = docs.manual.html;
docs-json = docs.options.json;
docs-manpages = docs.manPages;
} // testPackages);
} // testPackages // integrationTestPackages);
defaultPackage = forAllSystems (system: self.packages.${system}.default);
});