Skip to content

Commit

Permalink
Remove redundant systemd fact override
Browse files Browse the repository at this point in the history
This is now set by the mocked custom facts
  • Loading branch information
ekohl committed Aug 9, 2022
1 parent 83964b2 commit 629f7bc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 27 deletions.
10 changes: 1 addition & 9 deletions spec/classes/agent_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,6 @@

on_supported_os(baseline_os_hash).each do |os, facts|
context "on #{os}" do
systemd_fact = case facts[:osfamily]
when 'Archlinux', 'Fedora', 'Gentoo'
{ systemd: true }
else
{ systemd: false }
end
config_path = case facts[:operatingsystem]
when 'Fedora'
'/etc/zabbix_agentd.conf'
Expand All @@ -45,9 +39,7 @@
end
zabbix_version = '5.0'

let :facts do
facts.merge(systemd_fact)
end
let(:facts) { facts }

case facts[:osfamily]
when 'Gentoo'
Expand Down
10 changes: 1 addition & 9 deletions spec/classes/server_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,7 @@
next if facts[:os]['name'] == 'windows'

context "on #{os}" do
systemd_fact = case facts[:osfamily]
when 'Archlinux', 'Fedora', 'Gentoo'
{ systemd: true }
else
{ systemd: false }
end
let :facts do
facts.merge(systemd_fact)
end
let(:facts) { facts }

zabbix_version = '5.0'

Expand Down
10 changes: 1 addition & 9 deletions spec/defines/userparameters_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,7 @@
next if facts[:os]['name'] == 'windows'

context "on #{os}" do
let :facts do
systemd_fact = case facts[:os]['family']
when 'Archlinux', 'Fedora', 'Gentoo'
{ systemd: true }
else
{ systemd: false }
end
facts.merge(systemd_fact)
end
let(:facts) { facts }
let(:title) { 'mysqld' }
let(:pre_condition) { 'class { "zabbix::agent": include_dir => "/etc/zabbix/zabbix_agentd.d" }' }

Expand Down

0 comments on commit 629f7bc

Please sign in to comment.