From d6e30533a425a8c40f2d219cea38573ebd91a373 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Diemer?= <stephane.diemer@ubicast.eu> Date: Fri, 16 Mar 2018 16:31:10 +0100 Subject: [PATCH] Changed celerity version check (refs #23674). --- tests/test_mediaworker.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/tests/test_mediaworker.py b/tests/test_mediaworker.py index 847d40c2..788944d4 100755 --- a/tests/test_mediaworker.py +++ b/tests/test_mediaworker.py @@ -91,16 +91,14 @@ def check_celerity_connectivity(ip): def check_celerity_versions(ip): print('Checking tha celerity server and worker uses the same version.') - cmd = 'diff -Naur <(dpkg -s celerity-utils) <(ssh -t root@%s dpkg -s celerity-utils)' % ip - print(cmd) try: - out = subprocess.check_output(cmd, shell=True, timeout=5, universal_newlines=True) + ms_out = subprocess.check_output('dpkg -s celerity-utils', shell=True, timeout=10, universal_newlines=True) + mw_out = subprocess.check_output('ssh -t root@%s dpkg -s celerity-utils' % ip, shell=True, timeout=10, universal_newlines=True) except subprocess.CalledProcessError as e: print('%sFailed to check celerity version in MediaWorker "%s":\n%s%s' % (RED, ip, e, DEF)) return False - out = out.strip() - if out: - print('%sThe celerity version in MediaWorker "%s" is not the same as in MediaServer:\n%s%s' % (RED, ip, out, DEF)) + if ms_out.strip() != mw_out.strip(): + print('%sThe celerity version in MediaWorker "%s" is not the same as in MediaServer.%s' % (RED, ip, DEF)) return False print('%sThe celerity version in MediaWorker "%s" is the same as in MediaServer.%s' % (GREEN, ip, DEF)) return True -- GitLab