feat: switch from flake-parts & devenv to rensa + add nixtest

This commit is contained in:
technofab 2025-12-18 13:32:38 +01:00
parent 6af83809f7
commit 012a3afb2d
Signed by: technofab
SSH key fingerprint: SHA256:bV4h88OqS/AxjbPn66uUdvK9JsgIW4tv3vwJQ8tpMqQ
18 changed files with 553 additions and 611 deletions

30
tests/render_test.nix Normal file
View file

@ -0,0 +1,30 @@
{
pkgs,
ntlib,
system,
nixlets,
...
}: {
suites."Render Tests" = {
pos = __curPos;
tests = builtins.map (
nixlet: {
name = "render ${nixlet.name}";
type = "script";
script = let
output = nixlet.render {inherit system;};
in
# sh
''
${ntlib.helpers.path [pkgs.gnugrep]}
${ntlib.helpers.scriptHelpers}
assert "-f ${output}" "should render"
assert_file_contains "${output}" "apiVersion"
assert_file_contains "${output}" "kubenix/k8s-version"
assert_file_contains "${output}" "kubenix/project-name"
'';
}
) (builtins.attrValues nixlets);
};
}