From bad8fe30ab2c106afdcce565907fdd902490b8ac Mon Sep 17 00:00:00 2001 From: Jonathan Davies Date: Thu, 13 Nov 2025 16:43:37 +0000 Subject: [PATCH] nixos/prometheus: pushgateway test: Have client wait for network --- nixos/tests/prometheus/pushgateway.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nixos/tests/prometheus/pushgateway.nix b/nixos/tests/prometheus/pushgateway.nix index 6b13447085d9..8bd78a2c3aad 100644 --- a/nixos/tests/prometheus/pushgateway.nix +++ b/nixos/tests/prometheus/pushgateway.nix @@ -56,6 +56,9 @@ + "jq '.data.result[0].metric.version' | grep '\"${pkgs.prometheus-pushgateway.version}\"'" ) + client.systemctl("start network-online.target") + client.wait_for_unit("network-online.target") + # Add a metric and check in Prometheus client.wait_until_succeeds( "echo 'some_metric 3.14' | curl --data-binary @- http://pushgateway:9091/metrics/job/some_job"