-
Notifications
You must be signed in to change notification settings - Fork 211
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
Smoke test for migrations #437
Comments
This is not only a great idea for this project but for all rails apps in I can't tell you how many projects I've parachuted in on that had On Thu, Oct 27, 2016 at 9:05 AM, Tim Diggins notifications@github.com
|
@jayroh not sure my solution will be that general purpose to be exportable as a gem -- but having some working practice seems like a good idea. I've started a version using an sqlite file in the repo, but I think I'm going to switch to using a (still sqlite-specific) dump file and a restore command. This way (a) we can have more than just one smoke test (as there's a possible db-clean approach) and (b) can (eventually) support mysql/postgresql dbs. However it can't see a way out of requiring this to have a totally separate rspec run, as otherwise it requires us to reload Rails totally from within the spec run, which feels dubious. Also we should then as the first commit after a new minor-level release create new sample data + migration spec for the release and ditch the old sample data and migration spec (because there's no point in testing that say v0_6=>v0_7 migration works in v0.8.0 -- the answer is to checkout v0.7.0 and run it there.) Am trying to create instructions & tooling to help this. In the meantime I'm using my branch to sanity test the migrations we're writing for Customizable Notifiers (#441) |
Given #436 and similar...
I think it would be good to have a spec that can at least ensure that a given migration basically works: given a v0.7 sample sqlite file, we can run the migration. Could do more complex specs on this (cross db, specific checks) but a basic smoke test that the migration doesn't blow up would be v helpful.
Am working on this (mechanism to create a simple sample set in v0.x and then add it, and then a simple spec to test this (sqlite only, initially))
The text was updated successfully, but these errors were encountered: