Merge pull request #233247 from teutat3s/zhf/fix-prometheus-exporter-statsd

nixosTests.prometheus-exporters.statsd fix test

authored by

Martin Weinelt and committed by
GitHub
84229fb9 a02aaf96

+8 -6
+8 -6
nixos/tests/prometheus-exporters.nix
··· 1198 wait_for_unit("prometheus-statsd-exporter.service") 1199 wait_for_open_port(9102) 1200 succeed("curl http://localhost:9102/metrics | grep 'statsd_exporter_build_info{'") 1201 - succeed( 1202 - "echo 'test.udp:1|c' > /dev/udp/localhost/9125", 1203 - "curl http://localhost:9102/metrics | grep 'test_udp 1'", 1204 ) 1205 - succeed( 1206 - "echo 'test.tcp:1|c' > /dev/tcp/localhost/9125", 1207 - "curl http://localhost:9102/metrics | grep 'test_tcp 1'", 1208 ) 1209 ''; 1210 };
··· 1198 wait_for_unit("prometheus-statsd-exporter.service") 1199 wait_for_open_port(9102) 1200 succeed("curl http://localhost:9102/metrics | grep 'statsd_exporter_build_info{'") 1201 + wait_until_succeeds( 1202 + "echo 'test.udp:1|c' > /dev/udp/localhost/9125 && \ 1203 + curl http://localhost:9102/metrics | grep 'test_udp 1'", 1204 + timeout=10 1205 ) 1206 + wait_until_succeeds( 1207 + "echo 'test.tcp:1|c' > /dev/tcp/localhost/9125 && \ 1208 + curl http://localhost:9102/metrics | grep 'test_tcp 1'", 1209 + timeout=10 1210 ) 1211 ''; 1212 };