Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[rspec] Adopt Hiera v3 lookups with RSpec tests
To satisfy Hiera lookups (as opposed to purely 'fact' based references) RSpec tests now have their own respective Hiera hierarchy defined at: 'site/profiles/fixtures/hiera.yaml'. All existing (and future) RSpec tests will now perform "Automatic Parameter Lookups" only falling back to in-class default values should the corresponding key not be found. The 'datadir' path to the RSpec test directory is relative to the 'Profiles' module's 'root' directory: 'site/profiles'. As of this commit the "data-in-module" pattern is not currently utilised and consequently dedicated RSpec specific Hiera data files are consumed. The 'ghoneycutt-ssh' community module utilises a deprecated Hiera function, 'hiera_hash', for performing a "deep" merge of an explicit key: 'ssh::keys'. This is addressed in the same manner as: c3a17e3e896ad24599d6f9274cc8f37a45844e41. Unfortunately Hiera v3 had to be adopted as the Ruby gem 'rspec-puppet' utilised by `pdk` is unable to parse Hiera v5 configuration file syntax. Related links regarding Hiera v3 & puppet-rspec limitations: * rodjek/rspec-puppet#762 * rodjek/rspec-puppet#551 * https://tickets.puppetlabs.com/browse/HI-598
- Loading branch information