Skip to content

Commit

Permalink
Update lib/voxpupuli/test/facts.rb
Browse files Browse the repository at this point in the history
Co-authored-by: Ewoud Kohl van Wijngaarden <ewoud@kohlvanwijngaarden.nl>
  • Loading branch information
bastelfreak and ekohl authored Mar 23, 2024
1 parent 2e9936a commit 75f076d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/voxpupuli/test/facts.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ def add_facts_for_metadata(metadata)
metadata['dependencies'].each do |dependency|
case normalize_module_name(dependency['name'])
when 'camptocamp/systemd', 'puppet/systemd'
add_custom_fact :systemd, ->(_os, facts) { facts[:service_provider] == 'systemd' }
add_custom_fact :systemd, ->(_os, facts) do
(RSpec.configuration.facterdb_string_keys ? facts['service_provider'] : facts[:service_provider]) == 'systemd'
end
when 'puppetlabs/stdlib'
add_stdlib_facts
end
Expand Down

0 comments on commit 75f076d

Please sign in to comment.