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

@@ -1,5 +1,12 @@
{ inventory, clan-core, ... }:
{ clan-core, lib, ... }:
let
inventory = (
import ../build-inventory {
inherit lib clan-core;
}
);
inherit (inventory) buildInventory;
in
{
@@ -120,6 +127,30 @@ in
};
};
test_inventory_module_doesnt_exist =
let
configs = buildInventory {
directory = ./.;
inventory = {
services = {
fanatasy.instance_1 = {
roles.default.machines = [ "machine_1" ];
};
};
machines = {
"machine_1" = { };
};
};
};
in
{
expr = configs;
expectedError = {
type = "ThrownError";
msg = "ClanModule not found*";
};
};
test_inventory_role_doesnt_exist =
let
configs = buildInventory {