Fix(tests/inventory): fix test by adding passtrhough

Since nixosModule is not inspectable during unit test
This commit is contained in:
Johannes Kirschbauer
2025-06-04 14:30:12 +02:00
parent c9398fab12
commit e4e39f4b86

View File

@@ -98,7 +98,6 @@ let
. "foo-peer"; }; }; }; settings = { timeout = "foo-peer-jon"; }; vendoredSettings = { timeout = "conf . . "foo-peer"; }; }; }; settings = { timeout = "foo-peer-jon"; }; vendoredSettings = { timeout = "conf .
. ig.thing"; }; } ]; } . . ig.thing"; }; } ]; } .
*/ */
unwrapModule = m: (builtins.head m.imports);
in in
{ {
# settings should evaluate # settings should evaluate
@@ -160,9 +159,9 @@ in
# TODO: Cannot be tested like this anymore # TODO: Cannot be tested like this anymore
test_per_instance_settings_vendoring = { test_per_instance_settings_vendoring = {
x = res.importedModulesEvaluated.self-A.config;
expr = expr =
res.importedModulesEvaluated.self-A.config.result.allRoles.peer.allInstances.instance_foo.allMachines.jon.passthru.vendoredSettings;
res.importedModulesEvaluated.self-A.config.result.allRoles.peer.allInstances."instance_foo".allMachines.jon.passthru.vendoredSettings;
expected = { expected = {
timeout = "config.thing"; timeout = "config.thing";
}; };