nixos/test/prometheus-exporters/bird: fix race condition

The bird socket would not always be instantly present, when the exporter
was queried, leading to the test sometimes failing in its entirety.
This commit is contained in:
Martin Weinelt 2021-04-15 03:18:07 +02:00
parent dcdf30a78a
commit 65234f0911
No known key found for this signature in database
GPG key ID: 87C1E9888F856759

View file

@ -132,7 +132,9 @@ let
exporterTest = ''
wait_for_unit("prometheus-bird-exporter.service")
wait_for_open_port(9324)
succeed("curl -sSf http://localhost:9324/metrics | grep -q 'MyObviousTestString'")
wait_until_succeeds(
"curl -sSf http://localhost:9324/metrics | grep -q 'MyObviousTestString'"
)
'';
};