mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-10 22:30:59 +00:00
nixosTests.prometheus-exporters.dnsmasq: wait for DNSMasq before testing the exporter
When DNSMasq is not yet completly started trying to call the exporter
fails.
(cherry picked from commit 21a671c1ac)
This commit is contained in:
committed by
Bjørn Forsman
parent
5d8c813880
commit
ac8c9bfc93
@@ -218,6 +218,9 @@ let
|
||||
services.dnsmasq.enable = true;
|
||||
};
|
||||
exporterTest = ''
|
||||
wait_for_unit("dnsmasq.service")
|
||||
wait_for_open_port(53)
|
||||
wait_for_file("/var/lib/dnsmasq/dnsmasq.leases")
|
||||
wait_for_unit("prometheus-dnsmasq-exporter.service")
|
||||
wait_for_open_port(9153)
|
||||
succeed("curl -sSf http://localhost:9153/metrics | grep 'dnsmasq_leases 0'")
|
||||
|
||||
Reference in New Issue
Block a user