-
Notifications
You must be signed in to change notification settings - Fork 142
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
networking key in default_facts.yml masks all values from rspec-puppet-facts #543
Comments
thanks for raising this @silug.
run |
@jordanbreen28 That change does not appear to affect the behavior. I'm guessing the |
If it helps, I generated a module with the steps necessary to demonstrate the issue at https://github.com/silug/issue_543. |
@silug From what I can see, What's good is your initial point still stands, we definitely should have been deep merging by default in Just need to get thinking about the best way to proceed here. It's an interesting one; nice catch! |
disable stringify keys... it's so wrong. workaround bug puppetlabs/pdk-templates#543
Just hit that with PDK templates v3.0.1. Can we maybe delete the |
…erge (GH-543) - Fix merging of nested default facts
Describe the Bug
Adding a top-level
networking
key inspec/default_facts.yml
masks all values in thenetworking
key from rspec-puppet-facts. For example, in testsnetworking.fqdn
is not defined.Expected Behavior
The
networking
facts provided by rspec-puppet-facts should work in tests.Steps to Reproduce
Steps to reproduce the behavior:
pdk new module
template-url
andtemplate-ref
to point to upstream.pdk update
pdk new class
and add the following to the generated spec test:pdk test unit
The resulting error will look like this:
Environment
Additional Context
In previous versions of the templates, only top-level keys were defined in
spec/default_facts.yml
, so themerge
that was happening inspec/spec_helper.rb
worked fine with default values. With nested facts added tospec/default_facts.yml
, themerge
needs to be replaced with adeep_merge
.Note that simply removing
spec/default_facts.yml
by addingto
.sync.yml
and runningpdk update
also works since the default provided facts are being provided by rspec-puppet-facts already.The text was updated successfully, but these errors were encountered: