mirror of
https://github.com/thib8956/nginx-proxy
synced 2025-04-16 18:51:01 +00:00
test: VIRTUAL_PORT != single exposed port
This commit is contained in:
parent
97a5dec57a
commit
3785649eb6
@ -0,0 +1,8 @@
|
||||
import pytest
|
||||
import re
|
||||
|
||||
|
||||
def test_answer_is_served_from_virtual_port_which_is_ureachable(docker_compose, nginxproxy):
|
||||
r = nginxproxy.get("http://web.nginx-proxy.tld/port")
|
||||
assert r.status_code == 502
|
||||
assert re.search(r"\n\s+server \d+\.\d+\.\d+\.\d+:90;\n", nginxproxy.get_conf().decode('ASCII'))
|
@ -0,0 +1,15 @@
|
||||
web:
|
||||
image: web
|
||||
expose:
|
||||
- "81"
|
||||
environment:
|
||||
WEB_PORTS: "81"
|
||||
VIRTUAL_HOST: "web.nginx-proxy.tld"
|
||||
VIRTUAL_PORT: "90"
|
||||
|
||||
|
||||
sut:
|
||||
image: nginxproxy/nginx-proxy:test
|
||||
volumes:
|
||||
- /var/run/docker.sock:/tmp/docker.sock:ro
|
||||
- ../lib/ssl/dhparam.pem:/etc/nginx/dhparam/dhparam.pem:ro
|
Loading…
x
Reference in New Issue
Block a user