Commit bd5062b4 authored by Łukasz Nowak's avatar Łukasz Nowak

promise/monitor_bootstrap: Consider not run bootstrap as failure

/reviewed-on !68
parent 05582c0a
...@@ -16,7 +16,7 @@ class RunPromise(GenericPromise): ...@@ -16,7 +16,7 @@ class RunPromise(GenericPromise):
def sense(self): def sense(self):
process_pid_file = self.getConfig('process-pid-file') process_pid_file = self.getConfig('process-pid-file')
if not os.path.exists(process_pid_file): if not os.path.exists(process_pid_file):
self.logger.info("Bootstrap didn't run!") self.logger.error("Bootstrap didn't run!")
return return
with open(process_pid_file) as f: with open(process_pid_file) as f:
......
...@@ -65,9 +65,10 @@ extra_config_dict = { ...@@ -65,9 +65,10 @@ extra_config_dict = {
def test_monitor_bootstrap_no_run(self): def test_monitor_bootstrap_no_run(self):
self.configureLauncher() self.configureLauncher()
with self.assertRaises(PromiseError):
self.launcher.run() self.launcher.run()
result = self.getPromiseResult(self.promise_name) result = self.getPromiseResult(self.promise_name)
self.assertEqual(result['result']['failed'], False) self.assertEqual(result['result']['failed'], True)
self.assertEqual(result['result']['message'], "Bootstrap didn't run!") self.assertEqual(result['result']['message'], "Bootstrap didn't run!")
def test_monitor_bootstrap_ok(self): def test_monitor_bootstrap_ok(self):
......
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