Inventory: warning on undefined tags, instead of error.

This commit is contained in:
Johannes Kirschbauer
2025-01-08 11:05:13 +01:00
committed by hsjobeki
parent 037549ba38
commit 85d03f106b
3 changed files with 8 additions and 5 deletions

View File

@@ -178,6 +178,8 @@ in
msg = "Roles roleXYZ are not defined in the service borgbackup.";
};
};
# Needs NIX_ABORT_ON_WARN=1
# So the lib.warn is turned into abort
test_inventory_tag_doesnt_exist =
let
configs = buildInventory {
@@ -201,8 +203,9 @@ in
{
expr = configs;
expectedError = {
type = "ThrownError";
msg = "no machine with tag '\\w+' found";
type = "Error";
# TODO: Add warning matching in nix-unit
msg = ".*";
};
};
test_inventory_disabled_service =