-
Notifications
You must be signed in to change notification settings - Fork 26
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
Pods: with seaworthy tests #69
Conversation
example/fixtures.py
Outdated
|
||
def wait_for_start(self, docker_helper, container): | ||
# No real way to know when Nginx is ready. Wait a short moment. | ||
time.sleep(0.5) |
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 better option may be to make some dummy requests against Nginx.
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.
Does it have a status page we can hit?
MatchesPsTree('nginx', nginx_worker_args), | ||
])) | ||
|
||
def test_nginx_access_logs(self, nginx_container, web_container): |
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.
Whether a test is "for" the Nginx container or for the web/gunicorn container is kinda hard to say, since they work together. It's possible that it makes more sense for all the tests for headers and such to be in TestNginx
instead of TestWeb
, but I'm not sure.
example/fixtures.py
Outdated
# FIXME: there are probably better ways to skip these tests | ||
if pods: | ||
if request.fixturename in ['web_only_container', 'single_container']: | ||
pytest.skip() |
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 we can tie into collection hooks or something?
https://docs.pytest.org/en/latest/writing_plugins.html#hook-function-validation-and-execution
example/fixtures.py
Outdated
|
||
def wait_for_start(self, docker_helper, container): | ||
# No real way to know when Nginx is ready. Wait a short moment. | ||
time.sleep(0.5) |
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.
Does it have a status page we can hit?
if pods: | ||
if request.fixturename in [ | ||
'web_only_container', 'single_container']: | ||
pytest.skip() |
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 pytest.skip("these tests don't make sense for pods")
and something equivalent in the other branch?
Closing these pods PRs as I've learnt a lot about this stuff since then and would do this differently. |
No description provided.