Merge "Fix check_service_setting() logic"
This commit is contained in:
commit
7e9f7ae2e2
@ -394,17 +394,23 @@ class BaseTempestWhiteboxTestCase(base.BaseTempestTestCase):
|
||||
else:
|
||||
service_prefix = ""
|
||||
cmd_prefix = "crudini --get"
|
||||
for config_file in config_files:
|
||||
# If we have config file with defaults and second one with overrides,
|
||||
# the latter has the config that wins
|
||||
for config_file in reversed(config_files):
|
||||
setting = "{} {} {}".format(config_file, section, param)
|
||||
cmd = "{} {} {} || true".format(
|
||||
service_prefix, cmd_prefix, setting)
|
||||
LOG.debug("Command = '{}'".format(cmd))
|
||||
result = host['client'].exec_command(cmd)
|
||||
result = host['client'].exec_command(cmd).strip()
|
||||
LOG.debug("Result = '{}'".format(result))
|
||||
if value.lower() in result.lower():
|
||||
return True
|
||||
else:
|
||||
continue
|
||||
# Since we are checking files in reverse order,
|
||||
# if we've found a value than it's an override and we
|
||||
# should ignore values in other files
|
||||
if result:
|
||||
if value.lower() in result.lower():
|
||||
return True
|
||||
else:
|
||||
break
|
||||
|
||||
if skip_if_fails:
|
||||
raise cls.skipException(msg)
|
||||
|
Loading…
x
Reference in New Issue
Block a user