Fix is_service_on_node method

Method should return boolean according to check,
yet raises error upon expected non-zero exit status.

Change-Id: I328edfabbf0b7ff0df8eadaf3a151aa2ab9fcfe4
This commit is contained in:
Maor Blaustein 2024-08-12 14:45:26 +03:00
parent fe6c5325ca
commit fefb4e1292

View File

@ -541,7 +541,7 @@ class BaseTempestWhiteboxTestCase(base.BaseTempestTestCase):
LOG.debug("Checking for service '%s' (regex) existence on host '%s'.",
service_regex, host_ip)
catch = ssh_client.exec_command(
"systemctl --type=service | grep '{}'".format(
"systemctl --type=service | grep '{}'; true".format(
service_regex)).strip
if catch:
LOG.debug("Service found on host '%s':\n%s",