Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed elastalert-test-rule entrypoint to work #153

Merged
merged 1 commit into from
Jun 25, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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