Watch
0
0
Fork
You've already forked hyperhive
0

archive: push restic backup and prune metrics, and add a backups dashboard

This commit is contained in:
atlas 2026-11-14 11:06:38 +01:00
commit 723ce866f1

View file

@ -0,0 +1,27 @@
# `checks.script-test-otlp-gauges` — runs ../host-modules/lib/otlp-gauges.nix's
# `otlp_gauges` against a stub `curl`, with an endpoint and without. The cases
# are in ./otlp-gauges.sh.
{
pkgs,
...
}:
let
render =
endpoint:
pkgs.writeText "otlp-gauges.sh" (
import ../host-modules/lib/otlp-gauges.nix { inherit (pkgs) lib; } { inherit endpoint; }
);
in
pkgs.runCommand "hyperhive-script-test-otlp-gauges"
{
nativeBuildInputs = [
pkgs.coreutils
pkgs.jq
];
FUNCTIONS = render "http://10.42.0.1:4318";
FUNCTIONS_NO_ENDPOINT = render null;
}
''
${pkgs.bash}/bin/bash ${./otlp-gauges.sh}
touch "$out"
''