mirror of
https://github.com/nginx-proxy/nginx-proxy
synced 2025-08-20 20:44:37 +02:00
15 lines
486 B
Python
15 lines
486 B
Python
import pytest
|
|
import re
|
|
import time
|
|
|
|
|
|
def test_sha1_upstream_is_present_in_nginx_generated_conf(docker_compose, nginxproxy):
|
|
time.sleep(3)
|
|
conf = nginxproxy.get_conf().decode('ASCII')
|
|
assert re.search(r"upstream 3e837201a6255962094cd6d8f61e22b07d3cc8ed \{", conf)
|
|
|
|
def test_sha1_upstream_forwards_correctly(docker_compose, nginxproxy):
|
|
r = nginxproxy.get("http://web.nginx-proxy.tld/port")
|
|
assert r.status_code == 200
|
|
assert r.text == "answer from port 80\n"
|