-
Notifications
You must be signed in to change notification settings - Fork 202
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
issue when using rspec-puppet when puppetlabs-chocolatey is a dependency #691
Comments
@lmayorga1980 this error is when you are executing ON linux, for Windows OS, correct? I'm having a very very similar problem. My test works all fine when I execute ON windows, but the same test fails with this type of error when executing on a host that is Linux. |
@brettjacobson correct! 👍 |
I believe this is a problem related to the use of the So far my workaround is to NOT use os_facts from rspect-puppet-facts, but define my facts as follows in my test: let(:facts) do
{
kernel: 'windows',
osfamily: 'windows',
# operatingsystem: 'NOTwindows', # this short-circuits the puppetlabs-registry module bug
architecture: 'x64',
chocolateyversion: '0.10.11',
choco_install_path: 'C:\ProgramData\chocolatey',
path: 'C:\temp',
}
end I have to leave |
I suspect this is the wrong repo for this issue, but not sure what the correct place is. |
@brettjacobson I believe I created this https://github.com/lmayorga1980/puppet-module-chrome as a way of testing my Seems like the problem has been fixed.
|
This is still occurring almost a year later. The code in question which fails is https://github.com/puppetlabs/puppetlabs-chocolatey/blob/master/lib/puppet_x/chocolatey/chocolatey_install.rb#L8-L19 which is why changing the OS to something other than windows works around it. It would appear that rspec's
|
FWIW, this stub in the chocolatey module itself seems to resolve the problem https://github.com/chocolatey/puppet-chocolatey/blob/master/spec/unit/facter/choco_install_path_spec.rb#L10 Honestly I think that this is a bug in the chocolatey function, and this issue should be opened there: https://github.com/chocolatey/puppet-chocolatey/issues |
@rodjek and @ferventcoder, do the two of you have insight into which project should address this issue? It's still occurring with the rspec-puppet v2.7.8 (via PDK 1.15.0) and puppetlabs/chocolatey v5.0.1. |
@rnelson0 I think this should be handled in the chocolatey module, updating the conditional so that it detects if its being used inside rspec-puppet with something like |
rspec-puppet: 2.6.11
The text was updated successfully, but these errors were encountered: