Improve logging and the get function and test our third instance
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
This commit is contained in:
parent
346ff989e2
commit
1ff0d8fbd2
1 changed files with 7 additions and 5 deletions
|
@ -313,15 +313,16 @@ class TestAPI:
|
||||||
Return: None for exception
|
Return: None for exception
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
if auth == None:
|
resp = requests.get(url, auth=auth, verify=verify, timeout=120)
|
||||||
resp = requests.get(url, verify=verify)
|
|
||||||
else:
|
|
||||||
resp = requests.get(url, auth=auth, verify=verify)
|
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
_log.error("requests.get() failed with exception:", str(ex))
|
_log.error("requests.get() failed with exception:", str(ex))
|
||||||
return None
|
return None
|
||||||
|
|
||||||
_log.debug("response time in seconds: %s", resp.elapsed.total_seconds())
|
_log.debug(
|
||||||
|
"response time in seconds: %s -- %s",
|
||||||
|
resp.elapsed.total_seconds(),
|
||||||
|
url
|
||||||
|
)
|
||||||
|
|
||||||
return resp
|
return resp
|
||||||
|
|
||||||
|
@ -341,6 +342,7 @@ def main():
|
||||||
print("Tests started at %s." % time.asctime())
|
print("Tests started at %s." % time.asctime())
|
||||||
|
|
||||||
for env_name, base_url in [
|
for env_name, base_url in [
|
||||||
|
("datagrepper-timescalebd/aws", "http://datagrepper-timescale.arc.fedorainfracloud.org/datagrepper"),
|
||||||
("datagrepper-test/aws", "http://datagrepper-test.arc.fedorainfracloud.org/datagrepper"),
|
("datagrepper-test/aws", "http://datagrepper-test.arc.fedorainfracloud.org/datagrepper"),
|
||||||
("datagrepper-prod/aws", "http://datagrepper.arc.fedorainfracloud.org/datagrepper"),
|
("datagrepper-prod/aws", "http://datagrepper.arc.fedorainfracloud.org/datagrepper"),
|
||||||
("datagrepper-prod/openshift", "https://datagrepper-monitor-dashboard.app.os.fedoraproject.org"),
|
("datagrepper-prod/openshift", "https://datagrepper-monitor-dashboard.app.os.fedoraproject.org"),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue