From d2eec4bb1158fcfd820e2d9c64a0123330d51012 Mon Sep 17 00:00:00 2001 From: Scott Worley Date: Tue, 15 Sep 2020 15:34:42 -0700 Subject: nixos/tests/prometheus: Use curl --fail --- nixos/tests/prometheus.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'nixos/tests/prometheus.nix') diff --git a/nixos/tests/prometheus.nix b/nixos/tests/prometheus.nix index af2aa66a552..de1d10aa7ca 100644 --- a/nixos/tests/prometheus.nix +++ b/nixos/tests/prometheus.nix @@ -193,13 +193,13 @@ in import ./make-test-python.nix { # Check if prometheus responds to requests: prometheus.wait_for_unit("prometheus.service") prometheus.wait_for_open_port(${toString queryPort}) - prometheus.succeed("curl -s http://127.0.0.1:${toString queryPort}/metrics") + prometheus.succeed("curl -sf http://127.0.0.1:${toString queryPort}/metrics") # Let's test if pushing a metric to the pushgateway succeeds: prometheus.wait_for_unit("pushgateway.service") prometheus.succeed( "echo 'some_metric 3.14' | " - + "curl --data-binary \@- " + + "curl -f --data-binary \@- " + "http://127.0.0.1:${toString pushgwPort}/metrics/job/some_job" ) -- cgit 1.4.1