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

[tests] Improve tests for fluentd check. #1574

Merged
merged 1 commit into from
May 19, 2015
Merged

Conversation

hkaj
Copy link
Member

@hkaj hkaj commented Apr 23, 2015

No description provided.


from tests.common import load_check
from checks import AgentCheck
Copy link
Member

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))
Copy link
Member

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.

Copy link
Member

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 %.

@degemer
Copy link
Member

degemer commented May 15, 2015

You're not lucky @hkaj, this check was updated by this PR: #1623, so you have to rebase and update two more tests. 😛

metrics = check.get_metrics()
for m in metrics:
self.assertEquals(m[3]['tags'], ['type:forward'])
self.coverage_report()
Copy link
Member

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.

@hkaj hkaj force-pushed the haissam/fluentd-update-test branch from 4a5e798 to 8fa5234 Compare May 19, 2015 14:49
@hkaj hkaj force-pushed the haissam/fluentd-update-test branch from 8fa5234 to bef8b45 Compare May 19, 2015 15:35
hkaj added a commit that referenced this pull request May 19, 2015
[tests] Improve tests for fluentd check.
@hkaj hkaj merged commit 28cc86c into master May 19, 2015
@hkaj hkaj deleted the haissam/fluentd-update-test branch July 12, 2015 23:10
@coveralls
Copy link

coveralls commented Jan 23, 2017

Coverage Status

Changes Unknown when pulling bef8b45 on haissam/fluentd-update-test into ** on master**.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants