mirror of
https://github.com/thib8956/nginx-proxy
synced 2025-02-24 01:38:15 +00:00
tests: keepalive auto setting
This commit is contained in:
parent
443ee5202c
commit
2aa35aa637
@ -27,6 +27,14 @@ def test_keepalive_enabled(docker_compose, nginxproxy):
|
||||
assert r.status_code == 200
|
||||
assert not re.search(fr'(?m)^(?i:Connection):', r.text)
|
||||
|
||||
def test_keepalive_auto_enabled(docker_compose, nginxproxy):
|
||||
conf = nginxproxy.get_conf().decode('ASCII')
|
||||
assert re.search(r"keepalive 8\;", conf)
|
||||
|
||||
r = nginxproxy.get("http://keepalive-auto.nginx-proxy.test/headers")
|
||||
assert r.status_code == 200
|
||||
assert not re.search(fr'(?m)^(?i:Connection):', r.text)
|
||||
|
||||
def test_keepalive_enabled_other_headers_ok(docker_compose, nginxproxy):
|
||||
"""See the docstring for the disabled case above."""
|
||||
r = nginxproxy.get("http://keepalive-enabled.nginx-proxy.test/headers")
|
||||
|
@ -18,6 +18,19 @@ services:
|
||||
VIRTUAL_HOST: keepalive-enabled.nginx-proxy.test
|
||||
labels:
|
||||
com.github.nginx-proxy.nginx-proxy.keepalive: "64"
|
||||
|
||||
keepalive-auto:
|
||||
image: web
|
||||
deploy:
|
||||
mode: replicated
|
||||
replicas: 4
|
||||
expose:
|
||||
- "80"
|
||||
environment:
|
||||
WEB_PORTS: 80
|
||||
VIRTUAL_HOST: keepalive-auto.nginx-proxy.test
|
||||
labels:
|
||||
com.github.nginx-proxy.nginx-proxy.keepalive: "auto"
|
||||
|
||||
sut:
|
||||
image: nginxproxy/nginx-proxy:test
|
||||
|
Loading…
x
Reference in New Issue
Block a user