-
Notifications
You must be signed in to change notification settings - Fork 655
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
feat: add support for sequlize migration options #653
feat: add support for sequlize migration options #653
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
@googlebot I signed it! |
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.
thanks very much for the contribution @tim-yao! :D
impl LGTM, just a test request
it('should use the renamed table', async () => { | ||
const sequelize = new Sequelize(process.env.MYSQL_DB_URL); | ||
const tables = await sequelize.query('show tables'); | ||
await sequelize.close(); |
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.
could you put this line in a finally
block? if our query fails we still want the server connection to close so test process will exit :)
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.
Thanks @patrickhulce! Updated.
also fyi have some lint errors to fix :) https://github.com/GoogleChrome/lighthouse-ci/pull/653/checks?check_run_id=3094377453#step:9:33 |
@tim-yao I think we're running into issues with the test being run in the same set as the original mysql test because they're using the same DB. let's just go ahead and change the existing test to use the custom migration table name and add our assertion there rather than re-run the mysql set. WDYT? |
That or switch to sqlite database in a new file name that's a separate DB. |
That make sense to me. Will do it. @patrickhulce any idea? I get these errors in test with the new migration configs.I can see them in the CI as well. |
You haven't pushed the latest version with the suggestion so I'm not sure. Those errors are expected with the version of the code that has been pushed here (the databases are being reused between 2 tests with unexpected state). |
For suggestion from #652