Fix: add values prios eval tests

This commit is contained in:
Johannes Kirschbauer
2025-01-09 12:01:56 +01:00
committed by hsjobeki
parent 7fe996848e
commit 65ccf8e970
2 changed files with 12 additions and 3 deletions

View File

@@ -31,7 +31,7 @@ let
lib.warn ''
inventory.services.${serviceName}.${instanceName}: - ${roleName} tags: no machine with tag '${tag}' found.
Available tags: ${builtins.toJSON (lib.unique availableTags)}
'' []
'' [ ]
else
acc ++ tagMembers
) [ ] members.tags or [ ]);

View File

@@ -6,8 +6,17 @@ let
in
{
perSystem =
{ pkgs, system, ... }:
{
pkgs,
system,
lib,
...
}:
let
tests = import ./test.nix { inherit lib; };
in
{
legacyPackages.evalTests-values = tests;
checks = {
lib-values-eval = pkgs.runCommand "tests" { nativeBuildInputs = [ pkgs.nix-unit ]; } ''
export HOME="$(realpath .)"
@@ -15,7 +24,7 @@ in
nix-unit --eval-store "$HOME" \
--extra-experimental-features flakes \
${inputOverrides} \
--flake ${self}#legacyPackages.${system}.evalTests-inventory
--flake ${self}#legacyPackages.${system}.evalTests-values
touch $out
'';