nixos/tests/prometheus: wait for influxdb exporter before quering
Previously the influxdb exporter test was flaky as even after the service has started there is still a race before the service is actually listening and accepting connection on port 9122. With this commit the test will wait for the port to be open before proceeding.
This commit is contained in:
parent
72197a5c79
commit
92442b1f99
|
@ -280,6 +280,7 @@ let
|
|||
};
|
||||
exporterTest = ''
|
||||
wait_for_unit("prometheus-influxdb-exporter.service")
|
||||
wait_for_open_port(9122)
|
||||
succeed(
|
||||
"curl -XPOST http://localhost:9122/write --data-binary 'influxdb_exporter,distro=nixos,added_in=21.09 value=1'"
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue