Closed ekinanp closed 3 years ago
You can do $trusted['external']
to access external trusted data. This PR extends rspec-puppet to support mocking that.
According to the docs, this is an experimental feature. However, the "experimental" part is its implementation and its ability to support multiple external data sources. The basic API of accessing data via $trusted['external']
will remain unchanged.
Also, implementation's mostly symmetric with https://github.com/rodjek/rspec-puppet/commit/79149532aa1e89097739aed7b3d8560b3f2ad945#diff-71602a9b90b90213fafc0ce1b38e8664
Sounds good. We should change future docs to reference this as trusted_external instead of external_trusted b/c the docs was where I was going off of when naming this stuff.
@scotje or @DavidS could this get a review? It's needed to properly unit test any manifest that uses trusted['external']
like e.g. the ServiceNow CMDB integration
Been using the code in this PR and everything seems to work as expected. Would be great to see this in an upcoming release
Signed-off-by: Enis Inan enis.inan@puppet.com