I have been working on adding some predicate functions to puppetlabs-stdlib that test things based on 'interfaces' and related facts.
The functions themselves seem to work fine in my manifest-based smoketests, but I am running into trouble that may or may not be due to my ignorance about rspec or Facter. Something needs to be done to initialize Facter because lookupvar('interfaces') just returns :undefined. I have not found any examples in the existing rspec tests; getvar_spec.rb seems like it should have something but the tests it does are pretty basic. You can see some of what I've been trying at https://github.com/wcooley/puppetlabs-stdlib/blob/master/spec/unit/puppet/parser/functions/has_interface_with_spec.rb Is there something obvious I'm missing? Wil -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/XBJE-12hhCoJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.