# `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" ''