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

[haproxy] use new test class #1466

Merged
merged 1 commit into from
Mar 25, 2015
Merged

[haproxy] use new test class #1466

merged 1 commit into from
Mar 25, 2015

Conversation

degemer
Copy link
Member

@degemer degemer commented Mar 24, 2015

  • PEP8 and FLAKE8 cleaning in haproxy.py
  • use AgentCheckTest to test haproxy (rewrite old tests to have a 100%
    metrics coverage)
  • start/stop haproxy in ci/haproxy.rb, instead of inside the test
    itself
  • add a run_check_twice function inside AgentCheckTest to avoid code
    repetition when testing rates

@degemer degemer added this to the 5.3.0 milestone Mar 24, 2015
@@ -119,6 +120,12 @@ def __init__(self, *args, **kwargs):

self.check = None

# Helper function when testing rates
def run_check_twice(self, config, agent_config=None, mocks=None):
self.run_check(config, agent_config=None, mocks=None)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here you should pass the options the user intended to use and not None.

self.run_check(config, agent_config, mocks)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, copy/paste error, thanks !

@LeoCavaille
Copy link
Member

Nice cleanup 👍
Except the small comment above on the new function of AgentCheckTest it's GTG !

- PEP8 and FLAKE8 cleaning in `haproxy.py`
- use AgentCheckTest to test haproxy (rewrite old tests to have a 100%
  metrics coverage)
- start/stop haproxy in `ci/haproxy.rb`, instead of inside the test
  itself
- add a `run_check_twice` function inside `AgentCheckTest` to avoid code
  repetition when testing rates
@degemer degemer force-pushed the quentin/test_haproxy branch from d5c65b3 to a369fe7 Compare March 25, 2015 15:36
@LeoCavaille
Copy link
Member

Thanks!

LeoCavaille added a commit that referenced this pull request Mar 25, 2015
@LeoCavaille LeoCavaille merged commit 41bd52d into master Mar 25, 2015
@LeoCavaille LeoCavaille deleted the quentin/test_haproxy branch March 25, 2015 16:25
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.

2 participants