From 50f61979a561af9f8cf1301d6b459207daa91786 Mon Sep 17 00:00:00 2001 From: Johannes Kirschbauer Date: Mon, 7 Oct 2024 23:04:30 +0200 Subject: [PATCH] Fix: update tests and error message --- lib/inventory/build-inventory/default.nix | 2 +- lib/inventory/tests/default.nix | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/inventory/build-inventory/default.nix b/lib/inventory/build-inventory/default.nix index 70a13a72b..c51151322 100644 --- a/lib/inventory/build-inventory/default.nix +++ b/lib/inventory/build-inventory/default.nix @@ -103,7 +103,7 @@ let if builtins.pathExists path then path else - throw "Module doesn't have role: '${role}'. Path: ${path} not found." + throw "Module doesn't have role: '${role}'. Role: ${role}.nix not found." ) machineRoles; roleServiceConfigs = builtins.filter (m: m != { }) ( diff --git a/lib/inventory/tests/default.nix b/lib/inventory/tests/default.nix index 1189d7ec1..5460b477d 100644 --- a/lib/inventory/tests/default.nix +++ b/lib/inventory/tests/default.nix @@ -42,13 +42,13 @@ in expected = { server_imports = [ - "${clan-core.clanModules.borgbackup}/roles/server.nix" + (clan-core.clanModules.borgbackup + "/roles/server.nix") ]; client_1_imports = [ - "${clan-core.clanModules.borgbackup}/roles/client.nix" + (clan-core.clanModules.borgbackup + "/roles/client.nix") ]; client_2_imports = [ - "${clan-core.clanModules.borgbackup}/roles/client.nix" + (clan-core.clanModules.borgbackup + "/roles/client.nix") ]; }; }; @@ -114,8 +114,8 @@ in }; expected = { machine_1_imports = [ - "${clan-core.clanModules.borgbackup}/roles/client.nix" - "${clan-core.clanModules.borgbackup}/roles/server.nix" + (clan-core.clanModules.borgbackup + "/roles/client.nix") + (clan-core.clanModules.borgbackup + "/roles/server.nix") ]; }; };