Skip to content
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

Add hiera_data to the cache key, for hiera-puppet-helper #488

Merged
merged 1 commit into from
Apr 3, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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