Inventory/tests: add more eval smoke tests

This commit is contained in:
Johannes Kirschbauer
2024-10-08 12:05:57 +02:00
parent 1ee8e0a7b7
commit 8c15f58df6
3 changed files with 39 additions and 10 deletions

View File

@@ -98,7 +98,12 @@ let
roleModules = builtins.map (
role:
let
path = clan-core.clanModules.${serviceName} + "/roles/${role}.nix";
# Check the module exists
module =
clan-core.clanModules.${serviceName}
or (throw "ClanModule not found: '${serviceName}'. Make sure the module is added in the 'clanModules' attribute of clan-core.");
path = module + "/roles/${role}.nix";
in
if builtins.pathExists path then
path