1
0
mirror of https://github.com/thib8956/nginx-proxy synced 2025-02-24 09:48:14 +00:00

chore: white-space housekeeping

Noticed some trailing white-space. Removed for consistency with the rest of the file.
This commit is contained in:
polarathene 2022-01-01 01:39:51 +13:00
parent 115461744b
commit 6b3ee66783

View File

@ -34,9 +34,9 @@ test_container = 'nginx-proxy-pytest'
############################################################################### ###############################################################################
# #
# utilities # utilities
# #
############################################################################### ###############################################################################
@contextlib.contextmanager @contextlib.contextmanager
@ -60,7 +60,7 @@ def ipv6(force_ipv6=True):
class requests_for_docker(object): class requests_for_docker(object):
""" """
Proxy for calling methods of the requests module. Proxy for calling methods of the requests module.
When a HTTP response failed due to HTTP Error 404 or 502, retry a few times. When a HTTP response failed due to HTTP Error 404 or 502, retry a few times.
Provides method `get_conf` to extract the nginx-proxy configuration content. Provides method `get_conf` to extract the nginx-proxy configuration content.
""" """
@ -224,7 +224,7 @@ def docker_container_dns_resolver(domain_name):
ip = container_ip(container) ip = container_ip(container)
log.info(f"resolving domain name {domain_name!r} as IP address {ip} of container {container.name}") log.info(f"resolving domain name {domain_name!r} as IP address {ip} of container {container.name}")
return ip return ip
def monkey_patch_urllib_dns_resolver(): def monkey_patch_urllib_dns_resolver():
@ -306,7 +306,7 @@ def docker_compose_down(compose_file='docker-compose.yml'):
def wait_for_nginxproxy_to_be_ready(): def wait_for_nginxproxy_to_be_ready():
""" """
If one (and only one) container started from image nginxproxy/nginx-proxy:test is found, If one (and only one) container started from image nginxproxy/nginx-proxy:test is found,
wait for its log to contain substring "Watching docker events" wait for its log to contain substring "Watching docker events"
""" """
containers = docker_client.containers.list(filters={"ancestor": "nginxproxy/nginx-proxy:test"}) containers = docker_client.containers.list(filters={"ancestor": "nginxproxy/nginx-proxy:test"})
@ -416,18 +416,18 @@ def connect_to_all_networks():
############################################################################### ###############################################################################
# #
# Py.test fixtures # Py.test fixtures
# #
############################################################################### ###############################################################################
@pytest.fixture(scope="module") @pytest.fixture(scope="module")
def docker_compose(request): def docker_compose(request):
""" """
pytest fixture providing containers described in a docker compose file. After the tests, remove the created containers pytest fixture providing containers described in a docker compose file. After the tests, remove the created containers
A custom docker compose file name can be defined in a variable named `docker_compose_file`. A custom docker compose file name can be defined in a variable named `docker_compose_file`.
Also, in the case where pytest is running from a docker container, this fixture makes sure Also, in the case where pytest is running from a docker container, this fixture makes sure
our container will be attached to all the docker networks. our container will be attached to all the docker networks.
""" """
@ -463,9 +463,9 @@ def nginxproxy():
############################################################################### ###############################################################################
# #
# Py.test hooks # Py.test hooks
# #
############################################################################### ###############################################################################
# pytest hook to display additionnal stuff in test report # pytest hook to display additionnal stuff in test report
@ -492,9 +492,9 @@ def pytest_runtest_setup(item):
pytest.xfail(f"previous test failed ({previousfailed.name})") pytest.xfail(f"previous test failed ({previousfailed.name})")
############################################################################### ###############################################################################
# #
# Check requirements # Check requirements
# #
############################################################################### ###############################################################################
try: try: