Skip to content
Snippets Groups Projects
Commit e65bd1d4 authored by Florent Thiery's avatar Florent Thiery
Browse files

run all tests before quitting, refs #20586

parent d2fbca2f
No related branches found
No related tags found
No related merge requests found
......@@ -10,6 +10,10 @@ import sys
import requests
import imp
GREEN = '\033[92m'
RED = '\033[91m'
DEF = '\033[0m'
os.chdir(os.path.dirname(__file__))
if not os.path.isfile('../utils.py'):
print('conf.sh not found')
......@@ -30,8 +34,9 @@ for s in conf_servers:
v = conf.get(s)
try:
url = "https://%s" % v
print('Checking SSL certificate of %s' % url)
requests.get(url)
sys.exit(0)
except requests.exceptions.SSLError as e:
print('Error: SSL certificate for %s is not valid: %s' % (url, e))
sys.exit(1)
print('%sSSL certificate for %s is not valid: %s%s' % (RED, url, e, DEF))
all_ok = False
sys.exit(int(not all_ok))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment