mirror of
https://github.com/thib8956/nginx-proxy
synced 2025-02-24 09:48:14 +00:00
tests: Fix test_debug/*
tests when IPv6 is enabled
This commit is contained in:
parent
5d22134ee6
commit
26b0b05f73
@ -3,10 +3,10 @@ import re
|
||||
|
||||
def test_debug_info_is_present_in_nginx_generated_conf(docker_compose, nginxproxy):
|
||||
conf = nginxproxy.get_conf().decode('ASCII')
|
||||
assert re.search(r"# Exposed ports: \[\{\d+\.\d+\.\d+\.\d+\s+80\s+tcp \} \{\d+\.\d+\.\d+\.\d+\s+81\s+tcp \}\]", conf) or \
|
||||
re.search(r"# Exposed ports: \[\{\d+\.\d+\.\d+\.\d+\s+81\s+tcp \} \{\d+\.\d+\.\d+\.\d+\s+80\s+tcp \}\]", conf)
|
||||
assert re.search(r"# Exposed ports: \[\{\d+\.\d+\.\d+\.\d+\s+82\s+tcp \} \{\d+\.\d+\.\d+\.\d+\s+83\s+tcp \}\]", conf) or \
|
||||
re.search(r"# Exposed ports: \[\{\d+\.\d+\.\d+\.\d+\s+83\s+tcp \} \{\d+\.\d+\.\d+\.\d+\s+82\s+tcp \}\]", conf)
|
||||
assert re.search(r"# Exposed ports: \[\{[^}]+\s+80\s+tcp \} \{[^}]+\s+81\s+tcp \}\]", conf) or \
|
||||
re.search(r"# Exposed ports: \[\{[^}]+\s+81\s+tcp \} \{[^}]+\s+80\s+tcp \}\]", conf)
|
||||
assert re.search(r"# Exposed ports: \[\{[^}]+\s+82\s+tcp \} \{[^}]+\s+83\s+tcp \}\]", conf) or \
|
||||
re.search(r"# Exposed ports: \[\{[^}]+\s+83\s+tcp \} \{[^}]+\s+82\s+tcp \}\]", conf)
|
||||
assert "# Default virtual port: 80" in conf
|
||||
assert "# VIRTUAL_PORT: 82" in conf
|
||||
assert conf.count("# /!\\ Virtual port not exposed") == 1
|
||||
|
@ -3,6 +3,6 @@ import re
|
||||
|
||||
def test_debug_info_is_present_in_nginx_generated_conf(docker_compose, nginxproxy):
|
||||
conf = nginxproxy.get_conf().decode('ASCII')
|
||||
assert re.search(r"# Exposed ports: \[\{\d+\.\d+\.\d+\.\d+\s+80\s+tcp \} \{\d+\.\d+\.\d+\.\d+\s+81\s+tcp \}\]", conf) or \
|
||||
re.search(r"# Exposed ports: \[\{\d+\.\d+\.\d+\.\d+\s+81\s+tcp \} \{\d+\.\d+\.\d+\.\d+\s+80\s+tcp \}\]", conf)
|
||||
assert re.search(r"# Exposed ports: \[\{[^}]+\s+80\s+tcp \} \{[^}]+\s+81\s+tcp \}\]", conf) or \
|
||||
re.search(r"# Exposed ports: \[\{[^}]+\s+81\s+tcp \} \{[^}]+\s+80\s+tcp \}\]", conf)
|
||||
assert conf.count("# Exposed ports: [{") == 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user