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
10cd3e5f81
commit
3f88ba8903
@ -30,10 +30,11 @@ docker_client = docker.from_env()
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
|
|
||||||
class requests_retry_on_error_502(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 up to 30 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.
|
||||||
"""
|
"""
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.session = requests.Session()
|
self.session = requests.Session()
|
||||||
@ -318,7 +319,7 @@ def nginxproxy():
|
|||||||
is under test.
|
is under test.
|
||||||
"""
|
"""
|
||||||
network = connect_to_nginxproxy_network()
|
network = connect_to_nginxproxy_network()
|
||||||
yield requests_retry_on_error_502()
|
yield requests_for_docker()
|
||||||
disconnect_from_network(network)
|
disconnect_from_network(network)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user