-
Notifications
You must be signed in to change notification settings - Fork 21
Add e2e Graphite test #106
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
Conversation
tests/graphite_e2e_test.py
Outdated
| ) | ||
| container_id = proc.stdout.strip() | ||
|
|
||
| # Determine the randomly assigned host port for 80/tcp (HTTP) |
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.
Maybe helpful to be a bit more specific as the following lines mix python, bash and some docker syntax I never saw before.Like...
Determine the host port docker randomly chose for HTTP. (Maps to 80/tcp inside the container.)
tests/graphite_e2e_test.py
Outdated
| # Wait for data to be written and available | ||
| time.sleep(5) | ||
|
|
||
| yield http_port |
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.
The postgresql version of this yields also the container ID. It bothers me that these are essentially the same function yet they are inconsistent with their return/yield values. Second, why isn't the carbon port returned?
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.
How about now?
tests/graphite_e2e_test.py
Outdated
| assert "+300.0%" in output # cpu_usage change | ||
|
|
||
|
|
||
| @contextmanager |
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.
I feel like there's enough overlap that we should have one function that does this for Postgres, Graphite, etc. Or a common parent class.
44f75d8 to
7614495
Compare
7614495 to
87e7c24
Compare
No description provided.