mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-10 19:55:41 +03:00
nixos/tests/prometheus-exporters: Add a test to cover a regression.
This commit is contained in:
parent
4bfe837a58
commit
f1bcb88bf6
1 changed files with 9 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue