about summary refs log tree commit diff
path: root/nixos/tests
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2020-05-31 23:11:44 +0200
committerGitHub <noreply@github.com>2020-05-31 23:11:44 +0200
commit09a7612cbe1f913ebe0c2dc90b607253366c4cf3 (patch)
treebdd088384c6185e8c2e33d3d3b8609c04810a47f /nixos/tests
parent4cd605f3ca0dffe481e9aad8984d8cd2f62456d1 (diff)
parentc784d3ab76e872dc28c1ea62137e9f95106e6c58 (diff)
downloadnixlib-09a7612cbe1f913ebe0c2dc90b607253366c4cf3.tar
nixlib-09a7612cbe1f913ebe0c2dc90b607253366c4cf3.tar.gz
nixlib-09a7612cbe1f913ebe0c2dc90b607253366c4cf3.tar.bz2
nixlib-09a7612cbe1f913ebe0c2dc90b607253366c4cf3.tar.lz
nixlib-09a7612cbe1f913ebe0c2dc90b607253366c4cf3.tar.xz
nixlib-09a7612cbe1f913ebe0c2dc90b607253366c4cf3.tar.zst
nixlib-09a7612cbe1f913ebe0c2dc90b607253366c4cf3.zip
Merge pull request #88434 from pstch/patch-2
nixos/haproxy: add reloading support, use upstream service hardening
Diffstat (limited to 'nixos/tests')
-rw-r--r--nixos/tests/haproxy.nix8
1 files changed, 8 insertions, 0 deletions
diff --git a/nixos/tests/haproxy.nix b/nixos/tests/haproxy.nix
index 79f34b07faf4..ffb77c052a24 100644
--- a/nixos/tests/haproxy.nix
+++ b/nixos/tests/haproxy.nix
@@ -43,5 +43,13 @@ import ./make-test-python.nix ({ pkgs, ...}: {
     assert "haproxy_process_pool_allocated_bytes" in machine.succeed(
         "curl -k http://localhost:80/metrics"
     )
+
+    with subtest("reload"):
+        machine.succeed("systemctl reload haproxy")
+        # wait some time to ensure the following request hits the reloaded haproxy
+        machine.sleep(5)
+        assert "We are all good!" in machine.succeed(
+            "curl -k http://localhost:80/index.txt"
+        )
   '';
 })