Add basic unit test that evlauates the module

This commit is contained in:
Tim Van Baak 2022-12-28 15:43:15 -08:00
parent d9a5f6b7c2
commit 591172acc8
1 changed files with 20 additions and 0 deletions

View File

@ -39,6 +39,26 @@
'';
};
};
checks.${system}.test-module = let
test-lib = import "${nixpkgs}/nixos/lib/testing-python.nix" {
inherit system;
};
in
test-lib.makeTest {
name = "inquisitor-test-module";
nodes = {
host = { ... }: {
imports = [ self.nixosModules.default ];
services.inquisitor.enable = true;
};
};
testScript = ''
start_all()
host.wait_for_unit("multi-user.target")
host.succeed("[ -e /var/lib/inquisitor ]")
'';
};
};
in (my-flake.outputs-for each systems) // {
overlays.default = final: prev: {