From 0af7c2f7866f3d24b575dc052acfa11490131b89 Mon Sep 17 00:00:00 2001 From: Johannes Kirschbauer Date: Sat, 29 Mar 2025 14:27:52 +0100 Subject: [PATCH] chore: format test, remove unused attributes --- lib/distributed-service/tests/default.nix | 65 ++++++++++++----------- 1 file changed, 33 insertions(+), 32 deletions(-) diff --git a/lib/distributed-service/tests/default.nix b/lib/distributed-service/tests/default.nix index 694b80186..3ef549646 100644 --- a/lib/distributed-service/tests/default.nix +++ b/lib/distributed-service/tests/default.nix @@ -5,14 +5,6 @@ let inherit (lib) evalModules - mkOption - types - ; - - inherit (types) - submodule - attrsOf - str ; evalInventory = @@ -22,40 +14,49 @@ let modules = [ ../../inventory/build-inventory/interface.nix { - modules.test = {}; + modules.test = { }; } m ]; }).config; - flakeFixture = { inputs = {}; }; + flakeFixture = { + inputs = { }; + }; - callInventoryAdapter = inventoryModule: import ../inventory-adapter.nix { inherit lib; flake = flakeFixture; inventory = evalInventory inventoryModule; }; + callInventoryAdapter = + inventoryModule: + import ../inventory-adapter.nix { + inherit lib; + flake = flakeFixture; + inventory = evalInventory inventoryModule; + }; in { test_simple = - let res = callInventoryAdapter { - # Authored module - # A minimal module looks like this - # It isn't exactly doing anything but it's a valid module that produces an output - modules."simple-module" = { - _class = "clan.service"; - manifest = { - name = "netwitness"; + let + res = callInventoryAdapter { + # Authored module + # A minimal module looks like this + # It isn't exactly doing anything but it's a valid module that produces an output + modules."simple-module" = { + _class = "clan.service"; + manifest = { + name = "netwitness"; + }; + }; + # User config + instances."instance_foo" = { + module = { + name = "simple-module"; + }; }; }; - # User config - instances."instance_foo" = { - module = { - name = "simple-module"; - }; - }; - }; in - { - # Test that the module is mapped into the output - # We might change the attribute name in the future - expr = res.evals ? "self-simple-module"; - expected = true; - }; + { + # Test that the module is mapped into the output + # We might change the attribute name in the future + expr = res.evals ? "self-simple-module"; + expected = true; + }; }