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

promise/monitor_bootstrap: Consider not run bootstrap as failure

/reviewed-on !68
parent 05582c0a
Pipeline #6976 failed with stage
in 0 seconds
......@@ -16,7 +16,7 @@ class RunPromise(GenericPromise):
def sense(self):
process_pid_file = self.getConfig('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
with open(process_pid_file) as f:
......
......@@ -65,9 +65,10 @@ extra_config_dict = {
def test_monitor_bootstrap_no_run(self):
self.configureLauncher()
self.launcher.run()
with self.assertRaises(PromiseError):
self.launcher.run()
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!")
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