about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMaximilian Bosch <maximilian@mbosch.me>2021-04-24 21:13:09 +0200
committerGitHub <noreply@github.com>2021-04-24 21:13:09 +0200
commit7b2982e22eb3ca5016161abc0946f88bb43b1e09 (patch)
tree227ef3d321993f19315abb455b6578576124f076
parent0ca4f6b7395ffcfd0153791f9623a4844650b023 (diff)
parentfc55a1bdd4a863e354c3b7fa8bf19fb874949124 (diff)
Merge pull request #119498 from mweinelt/tests-bird
nixos/test/prometheus-exporters/bird: fix race condition
-rw-r--r--nixos/tests/prometheus-exporters.nix6
1 files changed, 5 insertions, 1 deletions
diff --git a/nixos/tests/prometheus-exporters.nix b/nixos/tests/prometheus-exporters.nix
index 62c0080dd5169..9aa430c25a4fb 100644
--- a/nixos/tests/prometheus-exporters.nix
+++ b/nixos/tests/prometheus-exporters.nix
@@ -118,6 +118,8 @@ let
       metricProvider = {
         services.bird2.enable = true;
         services.bird2.config = ''
+          router id 127.0.0.1;
+
           protocol kernel MyObviousTestString {
             ipv4 {
               import all;
@@ -132,7 +134,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'"
+        )
       '';
     };