diff --git a/tests/test_mediaworker.py b/tests/test_mediaworker.py index 847d40c239eb2aadc52f512285d743c8e444bc19..788944d4de6cf799edda53545246fe5a17e9e0f6 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