summary refs log tree commit diff
path: root/nixos/tests/haproxy.nix
diff options
context:
space:
mode:
authorPeter Hoeg <peter@hoeg.com>2019-11-08 13:47:13 +0800
committerJon <jonringer@users.noreply.github.com>2019-11-09 10:11:57 -0800
commit954e234b98341da130a0d5318ced8e756009a0e2 (patch)
tree5e809bd6a4b5d12a73a5a777b6401a81850758c7 /nixos/tests/haproxy.nix
parent4a589e5ea7b82de0d697502e0eb3e7edaab9e0ab (diff)
downloadnixpkgs-954e234b98341da130a0d5318ced8e756009a0e2.tar
nixpkgs-954e234b98341da130a0d5318ced8e756009a0e2.tar.gz
nixpkgs-954e234b98341da130a0d5318ced8e756009a0e2.tar.bz2
nixpkgs-954e234b98341da130a0d5318ced8e756009a0e2.tar.lz
nixpkgs-954e234b98341da130a0d5318ced8e756009a0e2.tar.xz
nixpkgs-954e234b98341da130a0d5318ced8e756009a0e2.tar.zst
nixpkgs-954e234b98341da130a0d5318ced8e756009a0e2.zip
nixos/haproxy: support hot-reload without dropping packets
Diffstat (limited to 'nixos/tests/haproxy.nix')
-rw-r--r--nixos/tests/haproxy.nix4
1 files changed, 3 insertions, 1 deletions
diff --git a/nixos/tests/haproxy.nix b/nixos/tests/haproxy.nix
index 22a83e9d1ea..72e77a68193 100644
--- a/nixos/tests/haproxy.nix
+++ b/nixos/tests/haproxy.nix
@@ -16,6 +16,8 @@ import ./make-test.nix ({ pkgs, ...}: {
           frontend http
             bind *:80
             mode http
+            option http-use-htx
+            http-request use-service prometheus-exporter if { path /metrics }
             use_backend http_server
         '';
       };
@@ -36,6 +38,6 @@ import ./make-test.nix ({ pkgs, ...}: {
     $machine->waitForUnit('haproxy.service');
     $machine->waitForUnit('httpd.service');
     $machine->succeed('curl -k http://localhost:80/index.txt | grep "We are all good!"');
-
+    $machine->succeed('curl -k http://localhost:80/metrics | grep haproxy_process_pool_allocated_bytes');
   '';
 })