-
Notifications
You must be signed in to change notification settings - Fork 394
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
Preserve comments in DrupalVM config when adding multisites. #3629
Conversation
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.
Any way this can have a meaningful test? You rely on an external package to edit a very specific, but important user yaml file. If that package is upgraded and breaks it we won't know without tests.
We can't test DrupalVM in TravisCI or Pipelines. The best we could do is to write a unit test with a mock DrupalVM config file to make sure Seems like that would have negligible value. |
Right, I was thinking of a test that edits a regular drupalvm yml file with comments and checks that it does not break it, e.g. only what was changed is changed. |
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.
Looks good!
Workaround for lack of comment support in Symfony YAML parser: symfony/symfony#22516
This isn't tied to a particular ticket, just something that bothered me when refactoring the multisite command previously.
To test, run
blt multisite
on a BLT project using DrupalVM, and opt to let it update your DrupalVM configuration. You should see that most (not all) of the comments inbox/config.yml
are preserved.