Closed hoffi closed 6 years ago
@hoffi thanks! Looks like this is causing a test failure as well.
1) Failure:
SoloCleanTest#test_removes_with_custom_sudo [/home/travis/build/matschaffer/knife-solo/lib/chef/knife/solo_clean.rb:25]:
unexpected invocation: #<Chef::Knife::SoloClean:0x2306860>.run_command("sudo rm -rf ~/chef-solo")
unsatisfied expectations:
- expected exactly once, not yet invoked: #<Chef::Knife::SoloClean:0x2306860>.run_command("/usr/some/sudo rm -rf ~/chef-solo")
satisfied expectations:
- allowed any number of times, not yet invoked: #<Chef::Knife::UI:0x23055a0>.warn(any_parameters)
- allowed any number of times, invoked once: #<Chef::Knife::UI:0x23055a0>.msg(any_parameters)
Likely just a bad expectation but let's get it fixed up before merging.
I fixed it and moved the tests for custom sudo commands to SshCommandTest
Fantastic. Thanks!
Do you plan a new release or pre-release of the gem including this fix anytime soon?
Could certainly do a pre this evening for you.
I’ve been avoiding a proper release since the integration tests are red but fixing them is so time (and money) consuming.
On Thu, Nov 9, 2017 at 17:14 Stefan Hoffmann notifications@github.com wrote:
Do you plan a new release or pre-release of the gem including this fix anytime soon?
— You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub https://github.com/matschaffer/knife-solo/pull/522#issuecomment-343078766, or mute the thread https://github.com/notifications/unsubscribe-auth/AAACshHR-Cx842O2TXDRMo5FyZJPxCGEks5s0rRRgaJpZM4QWImz .
--
-Mat
matschaffer.com
A pre-release would be perfect. 👍
Cool. Just pushed 0.7.0.pre2 - unit tests pass but I don't have anything convenient to cross check so let me know if you run into any trouble with it.
The
solo clean
command did not work for me. It always generated this command:sudo -p \'knife sudo password: \' -p \'knife sudo password: \' rm -rf
This is because
KnifeSolo::SshCommand
is calling#process_sudo
which is replacing "sudo" with thesudo_command
. But in this casesudo_command
was already present in the command. So i removed this from the Clean-Command and just used "sudo" like in the Cook-Command.Also the log level for my Cook runs defaulted to debug and generated a lot of output. I added an option to change it and defaulted it to the Chef-Log-Level.
I also made
enable_reporting
configurable through thesolo.rb
file.