diff --git a/spec/classes/agent_spec.rb b/spec/classes/agent_spec.rb index 7a61192d8..11616c75d 100644 --- a/spec/classes/agent_spec.rb +++ b/spec/classes/agent_spec.rb @@ -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' @@ -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' diff --git a/spec/classes/server_spec.rb b/spec/classes/server_spec.rb index 894c5a63a..9350a047f 100644 --- a/spec/classes/server_spec.rb +++ b/spec/classes/server_spec.rb @@ -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' diff --git a/spec/defines/userparameters_spec.rb b/spec/defines/userparameters_spec.rb index 9e6f54a95..9e8f66c52 100644 --- a/spec/defines/userparameters_spec.rb +++ b/spec/defines/userparameters_spec.rb @@ -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" }' }