voxpupuli / onceover

Your gateway drug to automated infrastructure testing with Puppet
141 stars 45 forks source link

Allow resolution of trusted[certname] from factset rather than localhost #327

Closed chambersmp closed 3 months ago

chambersmp commented 1 year ago

rspec-puppet - specifying trusted facts dictates "the standard trusted fact keys (certname, domain, and hostname) are derived from the value of :node".

The proposed change will update the behaviour of the template test_spec.rb.erb used to auto-generate class spec tests.

Conditions for setting :node: To ensure onceover resolves trusted[certname] correctly when compiling a catalog, check for presence of the key trusted[certname] in the factset:

See https://github.com/puppetlabs/rspec-puppet#specifying-trusted-facts

Issues: Fixes #289.