Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
17 lines (14 sloc) 472 Bytes
module RSpec::Puppet
module Support
def build_catalog nodename, facts_val
node_obj = Puppet::Node.new(nodename)
node_obj.merge(facts_val)
# trying to be compatible with 2.7 as well as 2.6
if Puppet::Resource::Catalog.respond_to? :find
Puppet::Resource::Catalog.find(node_obj.name, :use_node => node_obj)
else
Puppet::Resource::Catalog.indirection.find(node_obj.name, :use_node => node_obj)
end
end
end
end
Something went wrong with that request. Please try again.