2
0

test_vhost-empty-string.py 526 B

123456789101112
  1. import re
  2. import time
  3. def test_vhost_empty_string(docker_compose, nginxproxy):
  4. time.sleep(3)
  5. conf = nginxproxy.get_conf().decode()
  6. assert re.search(r"(?m)^\s*server_name\s+web2\.nginx-proxy\.test\s*;", conf)
  7. assert re.search(r"(?m)^\s*server_name\s+web3\.nginx-proxy\.test\s*;", conf)
  8. assert re.search(r"(?m)^\s*server_name\s+web4a\.nginx-proxy\.test\s*;", conf)
  9. assert re.search(r"(?m)^\s*server_name\s+web4b\.nginx-proxy\.test\s*;", conf)
  10. assert not re.search(r"(?m)^\s*server_name\s*;", conf)