8000 test: add test for unknown domain responses to acme challenge · nginx-proxy/nginx-proxy@7221006 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7221006

Browse files
p12ticbuchdag
authored andcommitted
test: add test for unknown domain responses to acme challenge
1 parent a1372d2 commit 7221006

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

test/test_acme-http-challenge-location/test_acme-http-challenge-location-disabled.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,10 @@ def test_noredirect_acme_challenge_location_enabled(docker_compose, nginxproxy,
2525
allow_redirects=False
2626
)
2727
assert r.status_code == 200
28+
29+
def test_unknown_domain_acme_challenge_location_disabled(docker_compose, nginxproxy, acme_challenge_path):
30+
r = nginxproxy.get(
31+
f"http://web-unknown.nginx-proxy.tld/{acme_challenge_path}",
32+
allow_redirects=False
33+
)
34+
assert r.status_code == 503

test/test_acme-http-challenge-location/test_acme-http-challenge-location-enabled-is-default.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,10 @@ def test_noredirect_acme_challenge_location_disabled(docker_compose, ngin C0FC xproxy,
2525
allow_redirects=False
2626
)
2727
assert r.status_code == 404
28+
29+
def test_unknown_domain_acme_challenge_location_default_enabled(docker_compose, nginxproxy, acme_challenge_path):
30+
r = nginxproxy.get(
31+
f"http://web-unknown.nginx-proxy.tld/{acme_challenge_path}",
32+
allow_redirects=False
33+
)
34+
assert r.status_code == 503

test/test_acme-http-challenge-location/test_acme-http-challenge-location-legacy.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,10 @@ def test_noredirect_acme_challenge_location_legacy(docker_compose, nginxproxy, a
1111
allow_redirects=False
1212
)
1313
assert r.status_code == 404
14+
15+
def test_unknown_domain_acme_challenge_location_legacy(docker_compose, nginxproxy, acme_challenge_path):
16+
r = nginxproxy.get(
17+
f"http://web-unknown.nginx-proxy.tld/{acme_challenge_path}",
18+
allow_redirects=False
19+
)
20+
assert r.status_code == 503

0 commit comments

Comments
 (0)
0