diff options
Diffstat (limited to 'nixos/tests/prometheus-exporters.nix')
-rw-r--r-- | nixos/tests/prometheus-exporters.nix | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/nixos/tests/prometheus-exporters.nix b/nixos/tests/prometheus-exporters.nix index e3bfff218adb0..defec2b8376d7 100644 --- a/nixos/tests/prometheus-exporters.nix +++ b/nixos/tests/prometheus-exporters.nix @@ -945,6 +945,24 @@ let ''; }; + script = { + exporterConfig = { + enable = true; + settings.scripts = [ + { name = "success"; script = "sleep 1"; } + ]; + }; + exporterTest = '' + wait_for_unit("prometheus-script-exporter.service") + wait_for_open_port(9172) + wait_until_succeeds( + "curl -sSf 'localhost:9172/probe?name=success' | grep -q '{}'".format( + 'script_success{script="success"} 1' + ) + ) + ''; + }; + smokeping = { exporterConfig = { enable = true; |