Commit ff3e374f authored by Xavier Thompson's avatar Xavier Thompson

promise: Allow asserting state in check_neo_health

parent b7cea990
......@@ -36,7 +36,12 @@ class RunPromise(GenericPromise):
(self.logger.error if 'problem' in severities else
self.logger.warning)('; '.join(summary))
else:
self.logger.info(summary[1])
expected_state = self.getConfig('expected-state')
status = summary[1]
if expected_state and not status.startswith(expected_state + ';'):
self.logger.error('%s; expected %s', status, expected_state)
else:
self.logger.info(status)
except Exception as e:
self.logger.critical(str(e))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment