-
Notifications
You must be signed in to change notification settings - Fork 308
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1408 from jertel/jertel/fix1193
fix collision of rule option
- Loading branch information
Showing
7 changed files
with
17 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,7 +46,7 @@ | |
'email': '[email protected]', | ||
'aggregation': {'hours': 2}, | ||
'include': ['comparekey', '@timestamp'], | ||
'fields': ['test_runtime_field']} | ||
'include_fields': ['test_runtime_field']} | ||
|
||
test_args = mock.Mock() | ||
test_args.config = 'test_config' | ||
|
@@ -276,8 +276,8 @@ def test_load_rules(): | |
assert isinstance(rules['rules'][0]['alert'][0], elastalert.alerts.Alerter) | ||
assert isinstance(rules['rules'][0]['timeframe'], datetime.timedelta) | ||
assert isinstance(rules['run_every'], datetime.timedelta) | ||
assert isinstance(rules['rules'][0]['fields'], list) | ||
assert 'test_runtime_field' in rules['rules'][0]['fields'] | ||
assert isinstance(rules['rules'][0]['include_fields'], list) | ||
assert 'test_runtime_field' in rules['rules'][0]['include_fields'] | ||
for included_key in ['comparekey', 'testkey', '@timestamp']: | ||
assert included_key in rules['rules'][0]['include'] | ||
|
||
|
@@ -368,7 +368,7 @@ def test_load_disabled_rules(): | |
def test_raises_on_missing_config(): | ||
optional_keys = ( | ||
'aggregation', 'use_count_query', 'query_key', 'compare_key', 'filter', 'include', 'es_host', 'es_port', | ||
'name', 'fields' | ||
'name', 'include_fields' | ||
) | ||
test_rule_copy = copy.deepcopy(test_rule) | ||
for key in list(test_rule_copy.keys()): | ||
|