add virtual path tests
This commit is contained in:
parent
cc17d7bfbf
commit
8d47538172
2 changed files with 10 additions and 11 deletions
|
@ -6,18 +6,16 @@ def test_default(docker_compose, nginxproxy):
|
|||
assert r.status_code == 200
|
||||
assert r.text == "answer from port 81\n"
|
||||
|
||||
def test_simple_path(docker_compose, nginxproxy):
|
||||
def test_simple_path_not_stripped(docker_compose, nginxproxy):
|
||||
r = nginxproxy.get("http://nginx-proxy.test/foo/port")
|
||||
assert r.status_code == 200
|
||||
assert r.text == "answer from port 82\n"
|
||||
assert r.status_code == 404
|
||||
|
||||
def test_deep_path(docker_compose, nginxproxy):
|
||||
r = nginxproxy.get("http://nginx-proxy.test/bar/even/deeper/port")
|
||||
def test_simple_path_stripped(docker_compose, nginxproxy):
|
||||
r = nginxproxy.get("http://nginx-proxy.test/bar/port")
|
||||
assert r.status_code == 200
|
||||
assert r.text == "answer from port 83\n"
|
||||
|
||||
def test_closed_path(docker_compose, nginxproxy):
|
||||
r = nginxproxy.get("http://nginx-proxy.test/bar/even/deeper/with/end/port")
|
||||
def test_deep_path_not_stripped(docker_compose, nginxproxy):
|
||||
r = nginxproxy.get("http://nginx-proxy.test/deep/path/port")
|
||||
assert r.status_code == 200
|
||||
assert r.text == "answer from port 84\n"
|
||||
|
||||
|
|
|
@ -22,7 +22,8 @@ web3:
|
|||
environment:
|
||||
WEB_PORTS: "83"
|
||||
VIRTUAL_HOST: "nginx-proxy.test"
|
||||
VIRTUAL_PATH: "/bar/even/deeper"
|
||||
VIRTUAL_PATH: "/bar"
|
||||
VIRTUAL_PATH_STRIP: "true"
|
||||
|
||||
web4:
|
||||
image: web
|
||||
|
@ -31,8 +32,8 @@ web4:
|
|||
environment:
|
||||
WEB_PORTS: "84"
|
||||
VIRTUAL_HOST: "nginx-proxy.test"
|
||||
VIRTUAL_PATH: "/bar/even/deeper/with/end/"
|
||||
|
||||
VIRTUAL_PATH: "/deep/path"
|
||||
VIRTUAL_PATH_STRIP: "true"
|
||||
|
||||
sut:
|
||||
image: jwilder/nginx-proxy:test
|
||||
|
|
Loading…
Reference in a new issue