Skip to content

Commit

Permalink
Merge pull request #153 from Yelp/fix_test_script
Browse files Browse the repository at this point in the history
Fixed elastalert-test-rule entrypoint to work
  • Loading branch information
Ivan Leichtling committed Jun 25, 2015
2 parents f32c6f2 + 769ca2d commit 318b466
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion elastalert/test_rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,10 @@ def run_rule_test(self):
if not args.schema_only and not args.count:
self.run_elastalert(args)

if __name__ == '__main__':

def main():
test_instance = MockElastAlerter()
test_instance.run_rule_test()

if __name__ == '__main__':
main()
1 change: 0 additions & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
-r requirements.txt
coverage
flake8
mock
pre-commit
pylint<1.4
pytest
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ argparse==1.3.0
elasticsearch==1.3.0
jira==0.32
jsonschema==2.2.0
mock==1.0.0
oauthlib==0.7.2
python-dateutil==2.4.0
requests==2.5.1
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
license='Copyright 2014 Yelp',
entry_points={
'console_scripts': ['elastalert-create-index=elastalert.create_index:main',
'elastalert-test-rule=elastalert.test_rule:run_rule_test',
'elastalert-test-rule=elastalert.test_rule:main',
'elastalert-rule-from-kibana=elastalert.rule_from_kibana:main']},
packages=find_packages(),
package_data={'elastalert': ['schema.yaml']},
Expand Down

0 comments on commit 318b466

Please sign in to comment.