diff --git a/tests/test_mediaworker.py b/tests/test_mediaworker.py index fbee1bf968d8f0c0441e5768fe8482362daa60a2..2d782d6eb235200aa7f4c4a3f2cbcb59c4b49159 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))