I was trying to call lookup() from within my tests so I could loop over the data and generate tests, but it seems that is too complicated to be worth it at his point. For reference, in old-style Hiera, it is possible to do something like this:
require 'hiera'
|
hiera = Hiera.new(config: 'spec/fixtures/hiera.yaml')
|
data = hiera.lookup('my_hiera_key', nil, nil)
|
This still works, of course, but it is limited to global-scope. It would be nice There should be something simple like this for Puppet::Pops::Lookup.lookup, or the steps required to do it should be clearly documented.
|