Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trusted external data testing doesn't work #131

Open
baurmatt opened this issue Nov 20, 2024 · 0 comments
Open

Trusted external data testing doesn't work #131

baurmatt opened this issue Nov 20, 2024 · 0 comments
Labels

Comments

@baurmatt
Copy link

Describe the Bug

Testing trusted external data as described in https://github.com/puppetlabs/rspec-puppet/?tab=readme-ov-file#specifying-trusted-external-data doesn't work

Expected Behavior

It works :yay:

Steps to Reproduce

Steps to reproduce the behavior:

  1. pdk new module foo --skip-interview && cd foo
  2. pdk new function bar
  3. sed -i 's,\$value \* 2,fail("Trusted external data is: ${trusted['external']}"),' functions/bar.pp
  4. sed -i 's,# with your expectations,let(:trusted_external_data) { {'foo' => 'bar'} },g' spec/functions/bar_spec.rb
  5. pdk test unit

=> See the output, grep for Trusted external data is: {}

Environment

  • PDK Version: 3.3.0
  • Puppet Version: 8.8.1
  • rspec-puppet Version: 5.0.0
  • OS Version: MacOS 15.1.1

Additional Context

Add any other context about the problem here.

@baurmatt baurmatt added the bug label Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant