mirror of
https://github.com/thib8956/nginx-proxy
synced 2024-11-22 11:56:31 +00:00
TESTS: improve error reporting for failed to run docker-compose
commands
This commit is contained in:
parent
6069bc53cd
commit
85370fa31f
@ -263,18 +263,18 @@ def get_nginx_conf_from_container(container):
|
|||||||
def docker_compose_up(compose_file='docker-compose.yml'):
|
def docker_compose_up(compose_file='docker-compose.yml'):
|
||||||
logging.info('docker-compose -f %s up -d' % compose_file)
|
logging.info('docker-compose -f %s up -d' % compose_file)
|
||||||
try:
|
try:
|
||||||
subprocess.check_output(shlex.split('docker-compose -f %s up -d' % compose_file))
|
subprocess.check_output(shlex.split('docker-compose -f %s up -d' % compose_file), stderr=subprocess.STDOUT)
|
||||||
except subprocess.CalledProcessError, e:
|
except subprocess.CalledProcessError, e:
|
||||||
logging.error("Error while runninng 'docker-compose -f %s up -d':\n%s" % (compose_file, e.output))
|
pytest.fail("Error while runninng 'docker-compose -f %s up -d':\n%s" % (compose_file, e.output), pytrace=False)
|
||||||
raise
|
|
||||||
|
|
||||||
def docker_compose_down(compose_file='docker-compose.yml'):
|
def docker_compose_down(compose_file='docker-compose.yml'):
|
||||||
logging.info('docker-compose -f %s down' % compose_file)
|
logging.info('docker-compose -f %s down' % compose_file)
|
||||||
try:
|
try:
|
||||||
subprocess.check_output(shlex.split('docker-compose -f %s down' % compose_file))
|
subprocess.check_output(shlex.split('docker-compose -f %s down' % compose_file), stderr=subprocess.STDOUT)
|
||||||
except subprocess.CalledProcessError, e:
|
except subprocess.CalledProcessError, e:
|
||||||
logging.error("Error while runninng 'docker-compose -f %s down':\n%s" % (compose_file, e.output))
|
pytest.fail("Error while runninng 'docker-compose -f %s down':\n%s" % (compose_file, e.output), pytrace=False)
|
||||||
raise
|
|
||||||
|
|
||||||
def wait_for_nginxproxy_to_be_ready():
|
def wait_for_nginxproxy_to_be_ready():
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user