diff --git a/tests/api2/test_truenas_verify.py b/tests/api2/test_truenas_verify.py index 6da29bb182977..12d1bcdcc0637 100644 --- a/tests/api2/test_truenas_verify.py +++ b/tests/api2/test_truenas_verify.py @@ -1,10 +1,9 @@ -import subprocess +from middlewared.test.integration.utils import ssh def test_truenas_verify(): - completed = subprocess.run('truenas_verify', timeout=30) + response = ssh('truenas_verify', check=False, complete_response=True) # Jenkins vms alter the system files for setup, so truenas_verify should generate errors. - assert completed.returncode != 0 - with open('/var/log/truenas_verify.log') as f: - assert f.readline(), 'Test environment should log file verification errors.' + assert not response['result'] + assert ssh('head /var/log/truenas_verify.log'), 'Test environment should log file verification errors.'