Cleanup machine-id,postgresql test

This commit is contained in:
pinpox
2025-08-21 14:02:19 +02:00
parent 396a8d1e5e
commit 65d194af58
2 changed files with 16 additions and 55 deletions

View File

@@ -1,40 +1,17 @@
{ ... }:
{ {
perSystem = perSystem.clan.nixosTests.machine-id = {
{ ... }:
{
clan.nixosTests.machine-id = {
name = "service-machine-id"; name = "service-machine-id";
clan = { clan = {
directory = ./.; directory = ./.;
machines.server = {
# Workaround until we can use nodes.server = { }; clan.core.settings.machine-id.enable = true;
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 = "";
}; };
}; };
# This is not an actual vm test, this is a workaround to
# generate the needed vars for the eval test.
testScript = "";
};
} }

View File

@@ -10,30 +10,14 @@
clan = { clan = {
directory = ./.; directory = ./.;
# Workaround until we can use nodes.machine = { }; machines.machine = {
modules."@clan/importer" = ../../../../clanServices/importer; clan.core.postgresql.enable = true;
clan.core.postgresql.users.test = { };
inventory = { clan.core.postgresql.databases.test.create.options.OWNER = "test";
machines.machine = { }; clan.core.settings.directory = ./.;
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 = ./.;
}
];
};
}; };
}; };
# TODO: Broken. Use instead of importer after fixing.
# nodes.machine = { };
testScript = testScript =
let let
runpg = "runuser -u postgres -- /run/current-system/sw/bin/psql"; runpg = "runuser -u postgres -- /run/current-system/sw/bin/psql";