forked from chocolatey-archive/puppet-chocolatey
-
Notifications
You must be signed in to change notification settings - Fork 65
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
Replace chocolatey::params with hiera data #272
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bastelfreak
previously approved these changes
Jan 14, 2022
This comment was marked as off-topic.
This comment was marked as off-topic.
smortex
changed the title
Drop the legacy chocolatey::params class
Replace chocolatey::params with hiera data
Feb 16, 2022
Updated this PR to squash the commits. |
The chocolatey::params class in an internal detail with low value for end users but cannot be made private for technical reasons so appears in end-users documentation. It is only useful to provide a default value to $chocolatey::choco_install_location when the fact choco_install_path is not defined, which can be achieved using hiera.
This is fine when the CI is exercised in GitHub Action environment but fails on my local machine with some reference to my user local facts overrides: ``` Failures: 1) Puppet::Type::Package::ProviderChocolatey self.read_choco_features when getting sources from the config file matches the count of sources in the config Failure/Error: ENV['ChocolateyInstall'] = Facter.value('choco_install_path') || PuppetX::Chocolatey::ChocolateyInstall.install_path #<File (class)> received :read with unexpected arguments expected: ("c:\\choco.config") got: ("/home/romain/.puppetlabs/opt/facter/facts.d/customer.yaml") # ./lib/puppet_x/chocolatey/chocolatey_common.rb:56:in `set_env_chocolateyinstall' # ./lib/puppet/provider/package/chocolatey.rb:63:in `read_choco_features' # ./spec/unit/puppet/provider/package/chocolatey_spec.rb:164:in `block (4 levels) in <top (required)>' 2) Puppet::Type::Package::ProviderChocolatey self.read_choco_features when getting sources from the config file contains xml elements Failure/Error: ENV['ChocolateyInstall'] = Facter.value('choco_install_path') || PuppetX::Chocolatey::ChocolateyInstall.install_path #<File (class)> received :read with unexpected arguments expected: ("c:\\choco.config") got: ("/home/romain/.puppetlabs/opt/facter/facts.d/customer.yaml") # ./lib/puppet_x/chocolatey/chocolatey_common.rb:56:in `set_env_chocolateyinstall' # ./lib/puppet/provider/package/chocolatey.rb:63:in `read_choco_features' # ./spec/unit/puppet/provider/package/chocolatey_spec.rb:173:in `block (4 levels) in <top (required)>' ``` Stub set_env_chocolateyinstall like done is the other tests to fix the issue.
bastelfreak
approved these changes
Feb 16, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
chocolatey::params
class in an internal detail with low value for end-users but cannot be made private for technical reasons so appears in end-users documentation. It is only useful to provide a default value to$chocolatey::choco_install_location
when the factchoco_install_path
is not defined, which can be achieved using hiera.