nixos/tests/prometheus-exporters: Add a test to cover a regression.

This commit is contained in:
Amanda Cameron 2021-11-19 13:52:49 -05:00
parent 4bfe837a58
commit f1bcb88bf6

View file

@ -1123,6 +1123,10 @@ let
systemd = {
exporterConfig = {
enable = true;
extraFlags = [
"--collector.enable-restart-count"
];
};
metricProvider = { };
exporterTest = ''
@ -1133,6 +1137,11 @@ let
'systemd_unit_state{name="basic.target",state="active",type="target"} 1'
)
)
succeed(
"curl -sSf localhost:9558/metrics | grep '{}'".format(
'systemd_service_restart_total{state="prometheus-systemd-exporter.service"} 0'
)
)
'';
};