diff options
author | Martin Weinelt <hexa@darmstadt.ccc.de> | 2021-04-15 03:18:07 +0200 |
---|---|---|
committer | Martin Weinelt <hexa@darmstadt.ccc.de> | 2021-04-15 03:18:07 +0200 |
commit | 65234f091107959952095e2e45f5a4dd1d087004 (patch) | |
tree | 601ffff2c11097f79c4b3e7ce0e1ff8c00296085 /nixos/tests/prometheus-exporters.nix | |
parent | dcdf30a78a523296b5f9d44fb67afac485b64737 (diff) | |
download | nixpkgs-65234f091107959952095e2e45f5a4dd1d087004.tar nixpkgs-65234f091107959952095e2e45f5a4dd1d087004.tar.gz nixpkgs-65234f091107959952095e2e45f5a4dd1d087004.tar.bz2 nixpkgs-65234f091107959952095e2e45f5a4dd1d087004.tar.lz nixpkgs-65234f091107959952095e2e45f5a4dd1d087004.tar.xz nixpkgs-65234f091107959952095e2e45f5a4dd1d087004.tar.zst nixpkgs-65234f091107959952095e2e45f5a4dd1d087004.zip |
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.
Diffstat (limited to 'nixos/tests/prometheus-exporters.nix')
-rw-r--r-- | nixos/tests/prometheus-exporters.nix | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/nixos/tests/prometheus-exporters.nix b/nixos/tests/prometheus-exporters.nix index 62c0080dd51..cf3518286fd 100644 --- a/nixos/tests/prometheus-exporters.nix +++ b/nixos/tests/prometheus-exporters.nix @@ -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'" + ) ''; }; |