-
Notifications
You must be signed in to change notification settings - Fork 137
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
Simple tests for db/migration #421
Conversation
Signed-off-by: Manuel Mendez <mmendez@equinix.com>
This way we can add a test to do some basic validations of the migrate.Migration values. Signed-off-by: Manuel Mendez <mmendez@equinix.com>
We've had previous commits that introduced migrations where the func name and migration id did not match, that could be pretty confusing. Same thing can happen with the file name too. It just seems like a good idea to make all the timestamp/names match so we can easily go from migrations in the db to func to file. Signed-off-by: Manuel Mendez <mmendez@equinix.com>
Codecov Report
@@ Coverage Diff @@
## master #421 +/- ##
==========================================
+ Coverage 33.08% 38.34% +5.25%
==========================================
Files 24 31 +7
Lines 2170 2355 +185
==========================================
+ Hits 718 903 +185
Misses 1376 1376
Partials 76 76
Continue to review full report at Codecov.
|
Just to play with coverage stats. Signed-off-by: Manuel Mendez <mmendez@equinix.com>
According to codecov our migrations have 100% code coverage so that means no bugs right? :D |
Thanks, I wrote this issue back then when the various bugs you referenced here showed up #414. |
Yep I don't think this'll get us a fix for #414 but sets us up to work on it :D |
Description
Some quick/shallow test for migration definition.
Why is this needed
#371 introduced a migration where none of the names matched :D, the Id & FuncName was fixed in #383 but that one missed the file name. Why make humans do things they're bad at when instead we can make a computer do something its good at? So this is that :D.
How Has This Been Tested?
Ran
go test
and it found the bad file name. I artificially changed an Id and the test caught the FuncName|Id mismatch.How are existing users impacted? What migration steps/scripts do we need?
N/A
Checklist:
I have: