mirror of
https://github.com/thib8956/nginx-proxy
synced 2025-07-01 22:35:45 +00:00
test: add tests for the DEBUG flag
This commit is contained in:
8
test/test_debug/test_server-debug-flag.py
Normal file
8
test/test_debug/test_server-debug-flag.py
Normal file
@ -0,0 +1,8 @@
|
||||
import pytest
|
||||
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 conf.count("# Exposed ports: [{") == 1
|
Reference in New Issue
Block a user