Added 2.7 support to catalog indirection call
As of 2.7.x, all indirections should be accessed through the faces API.
This commit is contained in:
parent
915b858252
commit
79be9dd45a
|
@ -18,8 +18,14 @@ module RSpec::Puppet
|
|||
|
||||
node = Puppet::Node.new('test_node')
|
||||
|
||||
Puppet::Resource::Catalog.find(node.name, :use_node => node)
|
||||
node.merge(facts)
|
||||
# trying to be compatible with 2.7 as well as 2.6
|
||||
if Puppet::Resource::Catalog.respond_to? :find
|
||||
Puppet::Resource::Catalog.find(node.name, :use_node => node)
|
||||
else
|
||||
require 'puppet/face'
|
||||
Puppet::Face[:catalog, :current].find(node.name, :use_node => node)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue