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

add warning return code (3), do not consider ssl as failure

parent 401c162b
No related branches found
No related tags found
No related merge requests found
...@@ -29,6 +29,7 @@ class Logger(object): ...@@ -29,6 +29,7 @@ class Logger(object):
def flush(self): def flush(self):
pass pass
log_buffer = StringIO() log_buffer = StringIO()
sys.stdout = Logger(sys.stdout, log_buffer) sys.stdout = Logger(sys.stdout, log_buffer)
sys.stderr = sys.stdout sys.stderr = sys.stdout
...@@ -194,6 +195,8 @@ class Tester(): ...@@ -194,6 +195,8 @@ class Tester():
successes += 1 successes += 1
elif p.returncode == 2: elif p.returncode == 2:
status = '\033[94mnot testable\033[0m' status = '\033[94mnot testable\033[0m'
elif p.returncode == 3:
status = '\033[93mwarning\033[0m'
else: else:
status = '\033[91mfailure\033[0m' status = '\033[91mfailure\033[0m'
failures += 1 failures += 1
......
...@@ -43,4 +43,7 @@ for s in conf_servers: ...@@ -43,4 +43,7 @@ for s in conf_servers:
except requests.exceptions.SSLError: except requests.exceptions.SSLError:
print('%sSSL certificate for %s is not valid%s' % (RED, url, DEF)) print('%sSSL certificate for %s is not valid%s' % (RED, url, DEF))
all_ok = False all_ok = False
sys.exit(int(not all_ok)) if not all_ok:
sys.exit(3)
else:
sys.exit(0)
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