-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Add migration test #5773
Add migration test #5773
Conversation
I have not wired the migration test in to the drone CI but this could also be done. |
Codecov Report
@@ Coverage Diff @@
## master #5773 +/- ##
=========================================
Coverage ? 38.01%
=========================================
Files ? 328
Lines ? 48328
Branches ? 0
=========================================
Hits ? 18372
Misses ? 27317
Partials ? 2639 Continue to review full report at Codecov.
|
af5944d
to
930ea08
Compare
This should be added added as drone step |
4db3e38
to
0bd51a4
Compare
OK I've rewritten this. There are migration tests for mysql, pgsql and sqlite. If anyone can provide sqls for mssql then those can be added. The default database is the testfixtures. The migration tests are wired into the drone file and are run just before the integration tests. |
b10f5f4
to
828ae44
Compare
This commit adds a simple migration test for v1.5.3, v1.6.4 and v1.7.0-rc3 Signed-off-by: Andrew Thornton <art27@cantab.net>
01db17a
to
189f9a8
Compare
Hmm... that doesn't work... I'll repush once I've got that working. |
613dea7
to
eb20c9b
Compare
OK I don't think the dump-fixtures command will work unfortunately. The xorm dump tables command doesn't quite translate the sql properly to make this. Perhaps this could be a different PR. |
This commit adds a simple migration test to ensure that gitea migrate actually works on sqlite.
It does not test the migrated db actually works with Gitea but at least tests whether the migrate command will not barf.
It would not be hard to wire in the integration tests as a next step on the db. (In fact I have already tested this.)
The command is
make test-migration
and will test migrations on sqlite from v1.4.3, v1.5.3, v1.6.4 and v1.7.0-rc3 to the current master.Signed-off-by: Andrew Thornton art27@cantab.net