From 0be96f299436c4f6460341511dcc7710767812bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florent=20Thi=C3=A9ry?= <florent.thiery@ubicast.eu> Date: Thu, 23 Feb 2017 17:09:27 +0100 Subject: [PATCH] add debug, refs #20596 --- tests/test_mediaworker.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/test_mediaworker.py b/tests/test_mediaworker.py index fbee1bf9..2d782d6e 100755 --- a/tests/test_mediaworker.py +++ b/tests/test_mediaworker.py @@ -22,10 +22,13 @@ es_utils = imp.load_source('es_utils', '../utils.py') conf = es_utils.load_conf() def check_ssh(ip): - status, output = subprocess.getstatusoutput('timeout 2 ssh -o StrictHostKeyChecking=no %s ls /tmp' % ip) + cmd = 'timeout 2 ssh -o StrictHostKeyChecking=no %s ls /tmp' % ip + print('Connecting: %s' % cmd) + status, output = subprocess.getstatusoutput(cmd) if status != 0: print('%sFailed to login using SSH%s' % (RED, DEF)) return False + print('%sLogged in successfully%s' % (GREEN, DEF)) return True all_ok = True @@ -34,3 +37,5 @@ worker_ip = conf.get('CELERITY_WORKER_IP') if worker_ip != '127.0.1.1': if not check_ssh(worker_ip): all_ok = False + +sys.exit(int(not all_ok)) -- GitLab