From afd1ba6306d8a42628dc9bb01e6cd8946892201e Mon Sep 17 00:00:00 2001 From: Johannes Kirschbauer Date: Tue, 1 Jul 2025 09:32:26 +0200 Subject: [PATCH] checks: mock self.inputs.self by default --- checks/mycelium/default.nix | 1 - clanServices/mycelium/tests/vm/default.nix | 1 - lib/clanTest/flake-module.nix | 8 ++++++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/checks/mycelium/default.nix b/checks/mycelium/default.nix index 7c3f2b297..abc0aec39 100644 --- a/checks/mycelium/default.nix +++ b/checks/mycelium/default.nix @@ -16,7 +16,6 @@ nixosLib.runTest ( name = "service-mycelium"; clan = { - test.useContainers = false; directory = ./.; modules."@clan/mycelium" = ../../clanServices/mycelium/default.nix; diff --git a/clanServices/mycelium/tests/vm/default.nix b/clanServices/mycelium/tests/vm/default.nix index d5cfd2c08..28ff0c8a6 100644 --- a/clanServices/mycelium/tests/vm/default.nix +++ b/clanServices/mycelium/tests/vm/default.nix @@ -6,7 +6,6 @@ name = "service-mycelium"; clan = { - test.useContainers = false; directory = ./.; inventory = { diff --git a/lib/clanTest/flake-module.nix b/lib/clanTest/flake-module.nix index af5636343..ad55dac56 100644 --- a/lib/clanTest/flake-module.nix +++ b/lib/clanTest/flake-module.nix @@ -149,6 +149,14 @@ in modules = [ clan-core.modules.clan.default { + self = { + inputs = { + # Simulate flake: 'self.inputs.self' + # Needed because local modules are imported from inputs.self + self = config; + set_inputs_in_tests_fixture_warning = throw "'self.inputs' within test needs to be set manually. Set 'clan.self.inputs' to mock inputs=`{}`"; + }; + }; _prefix = [ "checks" ""