nixos/tests/prometheus-exporters: Add a test to cover a regression.
This commit is contained in:
parent
4bfe837a58
commit
f1bcb88bf6
|
@ -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'
|
||||
)
|
||||
)
|
||||
'';
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue