From 65d194af58fd03d2641f0c59e16d8c8792c38013 Mon Sep 17 00:00:00 2001 From: pinpox Date: Thu, 21 Aug 2025 14:02:19 +0200 Subject: [PATCH] Cleanup machine-id,postgresql test --- .../machine-id/tests/flake-module.nix | 45 +++++-------------- .../postgresql/tests/flake-module.nix | 26 +++-------- 2 files changed, 16 insertions(+), 55 deletions(-) diff --git a/nixosModules/clanCore/machine-id/tests/flake-module.nix b/nixosModules/clanCore/machine-id/tests/flake-module.nix index ddcace433..b4f6b7d61 100644 --- a/nixosModules/clanCore/machine-id/tests/flake-module.nix +++ b/nixosModules/clanCore/machine-id/tests/flake-module.nix @@ -1,40 +1,17 @@ -{ ... }: { - perSystem = - { ... }: - { - clan.nixosTests.machine-id = { + perSystem.clan.nixosTests.machine-id = { - name = "service-machine-id"; + name = "service-machine-id"; - clan = { - directory = ./.; - - # Workaround until we can use nodes.server = { }; - modules."@clan/importer" = ../../../../clanServices/importer; - - inventory = { - machines.server = { }; - instances.importer = { - module.name = "@clan/importer"; - module.input = "self"; - roles.default.tags.all = { }; - roles.default.extraModules = [ - { - # Test machine ID generation - clan.core.settings.machine-id.enable = true; - } - ]; - }; - }; - }; - - # TODO: Broken. Use instead of importer after fixing. - # nodes.server = { }; - - # This is not an actual vm test, this is a workaround to - # generate the needed vars for the eval test. - testScript = ""; + clan = { + directory = ./.; + machines.server = { + clan.core.settings.machine-id.enable = true; }; }; + + # This is not an actual vm test, this is a workaround to + # generate the needed vars for the eval test. + testScript = ""; + }; } diff --git a/nixosModules/clanCore/postgresql/tests/flake-module.nix b/nixosModules/clanCore/postgresql/tests/flake-module.nix index 2ea5f59c9..b10f8419e 100644 --- a/nixosModules/clanCore/postgresql/tests/flake-module.nix +++ b/nixosModules/clanCore/postgresql/tests/flake-module.nix @@ -10,30 +10,14 @@ clan = { directory = ./.; - # Workaround until we can use nodes.machine = { }; - modules."@clan/importer" = ../../../../clanServices/importer; - - inventory = { - machines.machine = { }; - instances.importer = { - module.name = "@clan/importer"; - module.input = "self"; - roles.default.tags.all = { }; - roles.default.extraModules = [ - { - clan.core.postgresql.enable = true; - clan.core.postgresql.users.test = { }; - clan.core.postgresql.databases.test.create.options.OWNER = "test"; - clan.core.settings.directory = ./.; - } - ]; - }; + machines.machine = { + clan.core.postgresql.enable = true; + clan.core.postgresql.users.test = { }; + clan.core.postgresql.databases.test.create.options.OWNER = "test"; + clan.core.settings.directory = ./.; }; }; - # TODO: Broken. Use instead of importer after fixing. - # nodes.machine = { }; - testScript = let runpg = "runuser -u postgres -- /run/current-system/sw/bin/psql";