[Doc] archive_windir default fact requirement not documented
eleanorcuallado opened this issue · comments
I have noticed a lack of documenting the requirement for the custom fact windir_archive
to be defined as a default fact when doing RSpec tests on Puppet modules customizing puppet-archive to be used on windows machines.
Affected Puppet, Ruby, OS and module versions/distributions
- Puppet: 6.10
- Ruby: 2.6.5
- Distribution: Deploying on Windows nodes
- Module version: 4.4.0
How to reproduce (e.g Puppet code you use)
Simple compiling RSpec test for a module configuring archive:
class { 'archive':
seven_zip_source => "d:\\7zip-${zip_version}\\7z.exe",
seven_zip_provider => 'windows',
}
What are you seeing
I get the following error:
Evaluation Error: Unknown variable: '::archive_windir'
This error disappears when archive_windir
is added to defaults facts in the rspec_helper.rb
file.
The requirement for this variable to exist is not present within the documentation of the puppetforge (whereas the puppetversion
one is).
What behaviour did you expect instead
Add the requirement for this fact to be added to the helper when using it.