-
Notifications
You must be signed in to change notification settings - Fork 18
Add travis-based integration tests #146
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
108aca3
to
2e88c16
Compare
Ping @gsfr / @rentzso . I think we're ready to go with this. Please take a look. Note that coverage through paster for the integration tests is a bit tricky. If we want to get those numbers we probably will need to refactor the integration tests to call the WSGI handler directly, see an example here: http://stackoverflow.com/questions/6222528/unittesting-the-webapp-requesthandler-in-gae-python |
bin/run.sh
Outdated
|
||
|
||
# Default config values | ||
SCITRAN_CORE_INSECURE=${SCITRAN_CORE_INSECURE:-"true"} |
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.
This seems like a needlessly dangerous default. Couldn't we just have Travis set the environment variable?
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.
Yep, we could do that. I thought this would be easier for newbies - the tests fail without this setting.
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 see. Why don't we have runtests.sh
set this to true, but not run.sh
itself?
Thanks, @josschne. Would using uWSGI help with the coverage issue? Tentatively LGTM, pending clarifications or minor updates on various line comments. @andynemzek: Would appreciate a quick review of the diff on the two .sh files. |
Don't think using uWSGI would help with the coverage issue. In either case we need to enable coverage within the python environment, which can be done but is non-trivial. I'd like to focus on getting unit test coverage up and use the integration tests for their functional value, rather than any coverage. |
.travis.yml
Outdated
# to install python manually | ||
# Python isn't supported OOTB, so pick a language that makes Travis happy | ||
language: objective-c | ||
os: osx |
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.
Why are we testing on OSX?
At most I'd expect us to matrix build against both linux and OSX.
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.
This script assumes OSX - it uses brew. Would be nice to support multiple environments, but my understanding was we were limiting to OSX to start. Is that correct @gsfr?
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.
That is correct. We wanted to get started with Travis asap and we had an OS X launcher.
@gsfr didn't see anything pop out at me, but run.sh has grown quite a bit since I last worked on it. |
.travis.yml
Outdated
- brew update | ||
- brew install python | ||
before_script: | ||
- bin/install.sh --ci |
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.
install.sh
does not appear to take a --ci
flag.
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.
Not yet... :)
I'm going to stop reviewing here, as it started to become clear that much of the script's non-portability pre-dates this PR. I played with it a bit, but... for now I'll just accept that I can't run the tests this way, and maybe we worry about that (and CI on linux) after this lands. |
Thanks for the ping, @kofalt. Joe and I are on it. No action needed at the moment. |
aaf2936
to
d5f9db2
Compare
0f93b08
to
b18f029
Compare
bc5d1e2
to
c2489e8
Compare
- sudo apt-get update -qq | ||
- sudo apt-get -o Dpkg::Options::="--force-confnew" install -y -q docker-engine | ||
- sudo curl -o /usr/local/bin/docker-compose -L https://github.com/docker/compose/releases/download/1.6.2/docker-compose-`uname -s`-`uname -m` | ||
- sudo chmod +x /usr/local/bin/docker-compose |
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.
In general I prefer to keep the lines of vendor-specific CI files sparse, and instead throw these lines in a script where it's easier to document, maintain, and understand. bin/ci-install-docker-ecosystem.sh
?
Not a blocker for merge.
😎 This looks pretty great. At the architecture level, I question if we really need to boot virtualbox... I would have assumed we could use Travis' docker infra and just ran our containers on it. I'm assuming you've either already been down that road or decided it wasn't worth it. Either way, this approach is A-OK since it gets us that delicious green checkmark on PRs. The test layout is a tad hairy but makes sense; I like the fixtures. Great work! My read on the uwsgi config is that it probably won't affect us since we're using UWSGI in fast-cgi mode in prod, so I presume keepalive settings don't apply. Could be wrong! |
@ryansanford @kofalt: Thanks for the review! We only need to boot virtualbox on OSX (via docker-machine). The Travis CI tests are now running on Linux and assume docker is ready (Travis CI's OSX infra actually can't run virtualbox - which is where I got stuck). Not sure on the uwsgi comments. @ryansanford thoughts? What's the best way to get the keepalive options into the mix without breaking prod? @ryansanford I don't think http nor nginx are necessary here. I'm not sure I understood the motivation behind your comment. |
Thanks, @josschne. Nice work! I would like to still understand @ryansanford's comments before merging. Also, we may want to bring this in line with the conflicting #185 before merging. |
Ping @ryansanford. Can you provide more detail on your nginx comment? @gsfr - Looks like integration with #185 could be a large change to this PR. Would it make sense to separate that from this PR? |
Thanks, @josschne. After team discussion, we decided to go ahead with merging #185, which just happened. @ryansanford has committed to update this PR to fall inline with #185 as well as his latest infra. |
@gsfr - Alright. I'll consider my part on this PR complete. |
👍 😄 This is great stuff Joe, thanks! |
d7575fd
to
9118332
Compare
@gsfr Conflicts should be resolved, and travis build completes without error. Any final words before merging? |
Thanks, @ryansanford. Let's have @rentzso and @nagem take a final look. |
LGTM |
1 similar comment
LGTM |
@josschne Creating this PR to track work on enabling integration testing in travis