1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-18 09:09:45 +01:00
home-manager/tests/integration/default.nix
Robert Helgesson 043ba285c6
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.
2024-02-14 15:10:53 +01:00

20 lines
559 B
Nix

{ pkgs }:
let
nixosLib = import "${pkgs.path}/nixos/lib" { };
runTest = test:
nixosLib.runTest {
imports = [ test { node.pkgs = pkgs; } ];
hostPkgs = pkgs; # the Nixpkgs package set used outside the VMs
};
tests = {
nixos-basics = runTest ./nixos/basics.nix;
standalone-flake-basics = runTest ./standalone/flake-basics.nix;
standalone-standard-basics = runTest ./standalone/standard-basics.nix;
};
in tests // {
all = pkgs.linkFarm "all"
(pkgs.lib.mapAttrsToList (name: path: { inherit name path; }) tests);
}