summary refs log tree commit diff
path: root/nixos/tests/prometheus.nix
diff options
context:
space:
mode:
authorScott Worley <scottworley@scottworley.com>2020-09-15 15:34:42 -0700
committerFrederik Rietdijk <fridh@fridh.nl>2020-10-25 11:01:30 +0100
commitd2eec4bb1158fcfd820e2d9c64a0123330d51012 (patch)
tree88eb865dccbfe8dbb055d319ce6692d55220d9a6 /nixos/tests/prometheus.nix
parenta91aa489a6623b6ac5106687d6ac916f2baa34ec (diff)
downloadnixpkgs-d2eec4bb1158fcfd820e2d9c64a0123330d51012.tar
nixpkgs-d2eec4bb1158fcfd820e2d9c64a0123330d51012.tar.gz
nixpkgs-d2eec4bb1158fcfd820e2d9c64a0123330d51012.tar.bz2
nixpkgs-d2eec4bb1158fcfd820e2d9c64a0123330d51012.tar.lz
nixpkgs-d2eec4bb1158fcfd820e2d9c64a0123330d51012.tar.xz
nixpkgs-d2eec4bb1158fcfd820e2d9c64a0123330d51012.tar.zst
nixpkgs-d2eec4bb1158fcfd820e2d9c64a0123330d51012.zip
nixos/tests/prometheus: Use curl --fail
Diffstat (limited to 'nixos/tests/prometheus.nix')
-rw-r--r--nixos/tests/prometheus.nix4
1 files changed, 2 insertions, 2 deletions
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"
     )