浏览代码

test: do we get desired number of idle keepalive connections

Nicolas Duchon 1 年之前
父节点
当前提交
443ee5202c
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      test/test_keepalive.py

+ 3 - 0
test/test_keepalive.py

@@ -20,6 +20,9 @@ def test_keepalive_disabled_other_headers_ok(docker_compose, nginxproxy):
     assert re.search(fr'(?m)^(?i:X-Real-IP): ', r.text)
 
 def test_keepalive_enabled(docker_compose, nginxproxy):
+    conf = nginxproxy.get_conf().decode('ASCII')
+    assert re.search(r"keepalive 64\;", conf)
+
     r = nginxproxy.get("http://keepalive-enabled.nginx-proxy.test/headers")
     assert r.status_code == 200
     assert not re.search(fr'(?m)^(?i:Connection):', r.text)