-
Notifications
You must be signed in to change notification settings - Fork 26
Pods: with seaworthy tests #69
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
Closed
Closed
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
ee02114
Experimental setup with split Gunicorn/Nginx containers (aka 'pods')
JayH5 1f201e4
Merge branch 'seaworthy' into pods-seaworthy
JayH5 afbe81d
Initial work bringing up tests for pods
JayH5 e5a7ab3
Fix tests for non-pod containers
JayH5 b14fa67
Add volumes, get clients from nginx containers
JayH5 6424af6
Clean up test skipping (but it's still hacky)
JayH5 816a4fe
pods: Keep the default celery concurrency option
JayH5 533f430
pods: Try wait half a second for Nginx to start
JayH5 1ff833f
Remove unused docker-compose file
JayH5 50a9e14
Merge branch 'seaworthy' into pods-seaworthy
JayH5 81b53f2
pods: Add new default PYTHON_VERSION
JayH5 eb09d0b
Remember to save .travis.yml
JayH5 5f4f558
Travis: Fix nginx image tag
JayH5 83cae10
Try fix Nginx test, remove unneeded client logic
JayH5 c4c2982
Merge branch 'seaworthy' into pods-seaworthy
JayH5 63104d8
Merge branch 'seaworthy' into pods-seaworthy
JayH5 18d21fa
Merge branch 'seaworthy' into pods-seaworthy
JayH5 e97e3ba
Travis: Hopefully properly fix the nginx image tag
JayH5 302f721
Cleanup/fix, try use VolumeDefinition
JayH5 79a0ccd
TestNginx: Cleanup log fetching
JayH5 60649c6
Travis: But if I put seaworthy here...
JayH5 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,31 @@ | ||
import os | ||
|
||
import pytest | ||
|
||
|
||
def pytest_addoption(parser): | ||
parser.addoption( | ||
'--pods', action='store_true', | ||
help='run tests for pods') | ||
|
||
parser.addoption( | ||
'--django-bootstrap-image', action='store', | ||
default=os.environ.get('DJANGO_BOOTSTRAP_IMAGE', 'mysite:py3'), | ||
help='django-bootstrap docker image to test') | ||
|
||
parser.addoption( | ||
'--db-nginx-image', action='store', | ||
default=os.environ.get( | ||
'DB_NGINX_IMAGE', 'praekeltfoundation/django-bootstrap:nginx'), | ||
help='django-bootstrap Nginx docker image to test') | ||
|
||
|
||
def pytest_report_header(config): | ||
return 'django-bootstrap docker image: {}'.format( | ||
config.getoption('--django-bootstrap-image')) | ||
return 'django-bootstrap docker image: {}, nginx: {}'.format( | ||
config.getoption('--django-bootstrap-image'), | ||
config.getoption('--db-nginx-image')) | ||
|
||
|
||
@pytest.fixture(scope='session') | ||
def pods(request): | ||
return request.config.getoption('--pods') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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?