-
Notifications
You must be signed in to change notification settings - Fork 814
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
[tests] Improve tests for fluentd check. #1574
Conversation
|
||
from tests.common import load_check | ||
from checks import AgentCheck |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A debug import ? (not used anywhere)
self.assertServiceCheckOK(self.check.SERVICE_CHECK_NAME, | ||
tags=['fluentd_host:localhost', 'fluentd_port:24220']) | ||
for m in self.CHECK_GAUGES: | ||
self.assertMetric('%s.%s' % (self.CHECK_NAME, m)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should also check the tags.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, I know we don't really care about python 3 compatibility, but you should probably use format
instead of %
.
metrics = check.get_metrics() | ||
for m in metrics: | ||
self.assertEquals(m[3]['tags'], ['type:forward']) | ||
self.coverage_report() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You didn't test the service_check, the coverage report will fail.
4a5e798
to
8fa5234
Compare
8fa5234
to
bef8b45
Compare
[tests] Improve tests for fluentd check.
Changes Unknown when pulling bef8b45 on haissam/fluentd-update-test into ** on master**. |
No description provided.