Test(InventoryPersistence): add persist integration tests

This commit is contained in:
Johannes Kirschbauer
2025-05-21 17:55:43 +02:00
parent e17327bea8
commit e2520f6aa8
6 changed files with 150 additions and 1 deletions

View File

@@ -0,0 +1 @@
{}

View File

@@ -0,0 +1,29 @@
{ clanLib, lib, ... }:
let
eval = lib.evalModules {
modules = [
{
# Trying to write into the default
options.foo = lib.mkOption {
type = lib.types.str;
default = "bar";
};
options.protected = lib.mkOption {
type = lib.types.str;
};
}
{
# Cannot write into the default set prio
protected = "protected";
}
# Merge the "inventory.json"
(builtins.fromJSON (builtins.readFile ./1.json))
];
};
in
{
clanInternals.inventoryClass.inventory = eval.config;
clanInternals.inventoryClass.introspection = clanLib.introspection.getPrios {
options = eval.options;
};
}