test_server-debug-flag.py 405 B

12345678
  1. import pytest
  2. import re
  3. def test_debug_info_is_present_in_nginx_generated_conf(docker_compose, nginxproxy):
  4. conf = nginxproxy.get_conf().decode('ASCII')
  5. assert re.search(r"# Exposed ports: \[\{[^}]+\s+80\s+tcp \} \{[^}]+\s+81\s+tcp \}\]", conf) or \
  6. re.search(r"# Exposed ports: \[\{[^}]+\s+81\s+tcp \} \{[^}]+\s+80\s+tcp \}\]", conf)
  7. assert conf.count("# Exposed ports: [{") == 1