| Puppet Version: 6.17.0 Puppet Server Version: N/A OS Name/Version: Windows 10, Linux Running unit test on puppet code that uses find_template gives error during compilation of the unit test. Describe steps to reproduce:
- Add to new class a file resource with content using find_template().
-
Desired Behavior: The unit test should pass. Actual Behavior: When running the unit tests using for example `pdk test unit`, a file resource like this
file { "${rootFolder}/content_find_template.file": |
ensure => file, |
content => find_template($template).file, |
}
|
gives an error like this:
1) my_test::test_class on centos-7-x86_64 is expected to compile into a catalogue without dependency cycles Failure/Error: it { is_expected.to compile } error during compilation: Evaluation Error: Error while evaluating a Method call, Could not find any files from F:/Tools/Puppet/TestFindTemplateBug/my_test/spec/fixtures/modules/my_test/templates/template.erb (file: F:/Tools/Puppet/TestFindTemplateBug/my_test/spec/fixtures/modules/my_test/manifests/test_class.pp, line: 23, column: 40) on node naussma9xzrhk2.ra-int.com # ./spec/classes/test_class_spec.rb:10:in `block (4 levels) in <top (required)>'
|
See attached zip file that reproduces the error from scratch using the latest PDK. A similar error seen on Linux in our CI using a GitLab runner. |