Skip to content

Commit

Permalink
Add hiera_data to the cache key, for hiera-puppet-helper
Browse files Browse the repository at this point in the history
  • Loading branch information
rodjek committed Mar 30, 2017
1 parent eb0e46f commit b1f5d96
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/rspec-puppet/support.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ def load_catalogue(type, exported = false, manifest_opts = {})
node_name = nodename(type)

hiera_config_value = self.respond_to?(:hiera_config) ? hiera_config : nil
hiera_data_value = self.respond_to?(:hiera_data) ? hiera_data : nil

catalogue = build_catalog(node_name, facts_hash(node_name), trusted_facts_hash(node_name), hiera_config_value, code, exported)
catalogue = build_catalog(node_name, facts_hash(node_name), trusted_facts_hash(node_name), hiera_config_value, code, exported, hiera_data_value)

test_module = class_name.split('::').first
RSpec::Puppet::Coverage.add_filter(type.to_s, self.class.description)
Expand Down Expand Up @@ -217,7 +218,7 @@ def with_vardir
end
end

def build_catalog_without_cache(nodename, facts_val, trusted_facts_val, hiera_config_val, code, exported)
def build_catalog_without_cache(nodename, facts_val, trusted_facts_val, hiera_config_val, code, exported, hiera_data_value)

# If we're going to rebuild the catalog, we should clear the cached instance
# of Hiera that Puppet is using. This opens the possibility of the catalog
Expand Down

0 comments on commit b1f5d96

Please sign in to comment.