Merge pull request #289793 from LeSuisse/dnsmasq-exporter-test-wait-dnsmasq

nixosTests.prometheus-exporters.dnsmasq: wait for DNSMasq before testing the exporter
This commit is contained in:
Robert Scott
2024-02-18 21:26:41 +00:00
committed by GitHub
+3
View File
@@ -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'")