mirror of
https://github.com/thib8956/nginx-proxy
synced 2024-11-22 11:56:31 +00:00
TESTS: refactor conftest.py
This commit is contained in:
parent
3f88ba8903
commit
dcf8dd4682
@ -178,6 +178,7 @@ def wait_for_nginxproxy_to_be_ready():
|
|||||||
container = containers[0]
|
container = containers[0]
|
||||||
for line in docker_client.logs(container['Id'], stream=True):
|
for line in docker_client.logs(container['Id'], stream=True):
|
||||||
if "Watching docker events" in line:
|
if "Watching docker events" in line:
|
||||||
|
time.sleep(1) # give time to docker-gen to produce the new nginx config and reload nginx
|
||||||
logging.debug("nginx-proxy ready")
|
logging.debug("nginx-proxy ready")
|
||||||
break
|
break
|
||||||
|
|
||||||
@ -298,7 +299,6 @@ def docker_compose(request):
|
|||||||
remove_all_containers()
|
remove_all_containers()
|
||||||
docker_compose_up(docker_compose_file)
|
docker_compose_up(docker_compose_file)
|
||||||
wait_for_nginxproxy_to_be_ready()
|
wait_for_nginxproxy_to_be_ready()
|
||||||
time.sleep(3)
|
|
||||||
yield
|
yield
|
||||||
docker_compose_down(docker_compose_file)
|
docker_compose_down(docker_compose_file)
|
||||||
restore_urllib_dns_resolver(original_dns_resolver)
|
restore_urllib_dns_resolver(original_dns_resolver)
|
||||||
|
Loading…
Reference in New Issue
Block a user