Merge pull request #687 from mozilla/write_audit_custom

Updating search window time to be 15 mins
This commit is contained in:
Brandon Myers 2018-05-09 18:12:52 -05:00 коммит произвёл GitHub
Родитель 116866268c 739c8b27f9
Коммит 60497257a5
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -14,7 +14,7 @@ from query_models import SearchQuery, TermMatch, QueryStringMatch, PhraseMatch
class WriteAudit(AlertTask):
def main(self):
self.parse_config('write_audit.conf', ['skipprocess'])
search_query = SearchQuery(minutes=5)
search_query = SearchQuery(minutes=15)
search_query.add_must([
TermMatch('category', 'write'),

Просмотреть файл

@ -115,8 +115,8 @@ class TestWriteAudit(AlertTestSuite):
events = AlertTestSuite.create_events(default_event, 5)
for event in events:
event['_source']['utctimestamp'] = AlertTestSuite.subtract_from_timestamp_lambda({'minutes': 15})
event['_source']['receivedtimestamp'] = AlertTestSuite.subtract_from_timestamp_lambda({'minutes': 15})
event['_source']['utctimestamp'] = AlertTestSuite.subtract_from_timestamp_lambda({'minutes': 20})
event['_source']['receivedtimestamp'] = AlertTestSuite.subtract_from_timestamp_lambda({'minutes': 20})
test_cases.append(
NegativeAlertTestCase(
description="Negative test case with old timestamp",