mirror of
https://github.com/thib8956/nginx-proxy
synced 2024-11-25 05:16:30 +00:00
Merge pull request #1230 from kamermans/bugfix/ssl_tests_fail_dhparam
Fixed tests that are now failing due to the dhparam clearing command …
This commit is contained in:
commit
15d2817384
@ -7,6 +7,7 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- /var/run/docker.sock:/tmp/docker.sock:ro
|
- /var/run/docker.sock:/tmp/docker.sock:ro
|
||||||
- ./certs:/etc/nginx/certs:ro
|
- ./certs:/etc/nginx/certs:ro
|
||||||
|
- ../../lib/ssl/dhparam.pem:/etc/nginx/dhparam/dhparam.pem:ro
|
||||||
|
|
||||||
web1:
|
web1:
|
||||||
image: web
|
image: web
|
||||||
@ -30,4 +31,4 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
WEB_PORTS: "83"
|
WEB_PORTS: "83"
|
||||||
VIRTUAL_HOST: "3.web.nginx-proxy.tld"
|
VIRTUAL_HOST: "3.web.nginx-proxy.tld"
|
||||||
HTTPS_METHOD: nohttps
|
HTTPS_METHOD: nohttps
|
||||||
|
@ -11,6 +11,7 @@ from requests.exceptions import SSLError
|
|||||||
def test_http_redirects_to_https(docker_compose, nginxproxy, subdomain, should_redirect_to_https):
|
def test_http_redirects_to_https(docker_compose, nginxproxy, subdomain, should_redirect_to_https):
|
||||||
r = nginxproxy.get("http://%s.web.nginx-proxy.tld/port" % subdomain)
|
r = nginxproxy.get("http://%s.web.nginx-proxy.tld/port" % subdomain)
|
||||||
if should_redirect_to_https:
|
if should_redirect_to_https:
|
||||||
|
assert len(r.history) > 0
|
||||||
assert r.history[0].is_redirect
|
assert r.history[0].is_redirect
|
||||||
assert r.history[0].headers.get("Location") == "https://%s.web.nginx-proxy.tld/port" % subdomain
|
assert r.history[0].headers.get("Location") == "https://%s.web.nginx-proxy.tld/port" % subdomain
|
||||||
assert "answer from port 8%s\n" % subdomain == r.text
|
assert "answer from port 8%s\n" % subdomain == r.text
|
||||||
|
Loading…
Reference in New Issue
Block a user