Commit 2d1bb89d authored by Łukasz Nowak's avatar Łukasz Nowak

promise: Allow to configure failure-amount in check_surykatka_json

parent b23411a9
......@@ -24,6 +24,9 @@ class RunPromise(GenericPromise):
super(RunPromise, self).__init__(config)
# Set frequency compatible to default surykatka interval - 2 minutes
self.setPeriodicity(float(self.getConfig('frequency', 2)))
self.failure_amount = int(
self.getConfig('failure-amount', self.getConfig('failure_amount', 3)))
self.result_count = self.failure_amount
self.error_list = []
self.info_list = []
......@@ -268,4 +271,5 @@ class RunPromise(GenericPromise):
self.emitLog()
def anomaly(self):
return self._test(result_count=3, failure_amount=3)
return self._test(
result_count=self.result_count, failure_amount=self.failure_amount)
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