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
Make Capistrano respect --dry-run
in run_locally
#2133
base: master
Are you sure you want to change the base?
Conversation
@edspc thanks for the PR! I don't see any unit tests so I assume you have been testing this manually. Can you describe your approach to testing this code, and some samples of the dry-run output you get? I'd like to work with you to get some automated test coverage in place for this behavior. Also, we should update the documentation so people know about this behavior. Is there a place in the README or at https://capistranorb.com where it makes sense to mention it? |
Co-authored-by: Yuri Smirnov <tycoooon@gmail.com>
Hi @mattbrictson! I've added some tests and the notice to the docs. |
@edspc Thanks! The structure of the tests looks good. I may make some tweaks before merging, but this is very helpful. |
@edspc I redid the specs to remove the mocks while hopefully still testing what's important. What do you think? |
--dry-run
in run_locally
Summary
As there is no solution for issue #1822, I suggest updating
run_locally
to respect dry_run and addingrun_locally!
to ignore it and keep original behaviour.Based on @tycooon answer.
Short checklist
bundle exec rubocop -a
to fix linter issues?Other Information
I need this to use a custom SCM plugin that manages the git repository locally and creates a tar archive also locally. So during dry_run, I don't need to create an archive, but some git commands still should be executed.