mirror of
https://github.com/thib8956/nginx-proxy
synced 2025-06-30 22:05:46 +00:00
tests: Add tests for how Let's Encrypt ACME challenge is handled
At the moment no changes to functionality are done, only the current behavior is captured.
This commit is contained in:
@ -7,6 +7,13 @@ def test_web2_http_is_connection_refused(docker_compose, nginxproxy):
|
||||
nginxproxy.get("http://web2.nginx-proxy.tld/")
|
||||
|
||||
|
||||
def test_web2_http_is_connection_refused_for_acme_challenge(
|
||||
docker_compose, nginxproxy, acme_challenge_path
|
||||
):
|
||||
with pytest.raises(requests.exceptions.RequestException, match="Connection refused"):
|
||||
nginxproxy.get(f"http://web2.nginx-proxy.tld/{acme_challenge_path}")
|
||||
|
||||
|
||||
def test_web2_https_is_forwarded(docker_compose, nginxproxy):
|
||||
r = nginxproxy.get("https://web2.nginx-proxy.tld/port", allow_redirects=False)
|
||||
assert r.status_code == 200
|
||||
|
Reference in New Issue
Block a user