Skip to content
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 higher-level db migration tests #1252

Open
wants to merge 45 commits into
base: master
Choose a base branch
from

Conversation

alxndrsn
Copy link
Contributor

@alxndrsn alxndrsn commented Oct 29, 2024

TODO

  • remove new .eslintrc rules
  • tidy up logging

Follow-up

  • describeMigration.only()
  • assertColumnExists()

Copy link
Member

@matthew-white matthew-white left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a few different questions, but overall this definitely looks like it's heading in the right direction to me. I like the assertion functions in utils.js, and I like the looks of the actual tests (20241008-01-add-user_preferences.spec.js). If we could get our migration tests looking like that going forward, that'd be a big improvement. 👍

test/db-migrations/migrator.js Show resolved Hide resolved
test/db-migrations/migrator.js Show resolved Hide resolved
test/db-migrations/migrator.js Outdated Show resolved Hide resolved
test/db-migrations/utils.js Show resolved Hide resolved
test/db-migrations/utils.js Show resolved Hide resolved
test/db-migrations/1900-test-first.spec.js Outdated Show resolved Hide resolved
config/db-migration-test.json Outdated Show resolved Hide resolved
test/db-migrations/.eslintrc.js Outdated Show resolved Hide resolved
test/db-migrations/mocha-setup.db-migrations.js Outdated Show resolved Hide resolved
test/db-migrations/utils.js Show resolved Hide resolved
Copy link
Member

@matthew-white matthew-white left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feels like it's getting close!

.github/workflows/db-migrations.yml Show resolved Hide resolved
.github/workflows/db-migrations.yml Outdated Show resolved Hide resolved
test/db-migrations/migrator.js Outdated Show resolved Hide resolved
test/db-migrations/migrator.js Outdated Show resolved Hide resolved
test/db-migrations/migrator.js Outdated Show resolved Hide resolved
test/db-migrations/mocha-setup.js Outdated Show resolved Hide resolved
test/db-migrations/utils.js Outdated Show resolved Hide resolved
test/db-migrations/utils.js Outdated Show resolved Hide resolved
@alxndrsn alxndrsn marked this pull request as ready for review November 20, 2024 08:06
@alxndrsn alxndrsn changed the title wip: add higher-level db migration tests add higher-level db migration tests Nov 20, 2024
Copy link
Member

@matthew-white matthew-white left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay on code review! I really like the approach here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants