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

Remove last migration's spec file #3415

Merged
merged 1 commit into from
Nov 14, 2019

Conversation

kennyadsl
Copy link
Member

Description

This migration spec has done its job for users upgrading up to v2.9 and now I think we can safely remove it assuming users are upgrading Solidus one version at the time.

Also, the migration is quite complex since it uses some ActiveRecord internals that may change with time.

Checklist:

This migration spec has done its job for users upgrading up to
v2.9 and now I think we can safely remove it assuming users are
upgrading Solidus one version at time.

Also, the migration is quite complex since it uses some
ActiveRecord internals that may change with time.
@kennyadsl kennyadsl added the changelog:solidus_core Changes to the solidus_core gem label Oct 30, 2019
@kennyadsl kennyadsl self-assigned this Oct 30, 2019
Copy link
Member

@spaghetticode spaghetticode left a comment

Choose a reason for hiding this comment

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

IMO there's still some value in leaving these tests be as long as they don't become problematic.

I'm thinking they work as a good example for future migration tests, the migration is still there, so having that covered by tests is good as long as these tests work, and a lot of effort was put into writing them and making them work... but maybe it's time to let them go 😄

So, I'm fine with whatever the core team decides to do... thank you @kennyadsl 👍

@kennyadsl
Copy link
Member Author

@spaghetticode I'd love to keep it but, while testing a branch with another migration, I've found some issue that I didn't consider adding this spec. For example, as is, it gives for granted that the migration under test is the last one, and if/when we'll add a new migration this spec will need some adjustment. This random experiment showed the weakness of testing migrations.

Also, there's a lot of boilerplate code, which I tried to extract into some RSpec migration helpers here, which I leave for reference if we want to add it back for new migrations.

Going to merge this since it seems like I have a stronger opinion here. 🙂

@kennyadsl kennyadsl merged commit a23f0fd into solidusio:master Nov 14, 2019
@kennyadsl kennyadsl deleted the remove-migration-spec branch November 14, 2019 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog:solidus_core Changes to the solidus_core gem
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants