|
119 | 119 | end |
120 | 120 |
|
121 | 121 | ['infinity', -1, 1234].each do |value| |
122 | | - context "with file_limit => '#{value}'", if: os_facts['systemd'] do |
| 122 | + context "with file_limit => '#{value}'", if: os_facts['kernel'] == 'Linux' do |
123 | 123 | let(:params) { { file_limit: value } } |
124 | 124 |
|
125 | 125 | selinux_ignore_defaults = os_facts[:os]['family'] == 'RedHat' |
|
143 | 143 | end |
144 | 144 |
|
145 | 145 | [-1000, 0, 1000].each do |value| |
146 | | - context "with oom_score_adj => '#{value}'", if: os_facts['systemd'] do |
| 146 | + context "with oom_score_adj => '#{value}'", if: os_facts[:kernel] == 'Linux' do |
147 | 147 | let(:params) { { oom_score_adj: value } } |
148 | 148 |
|
149 | 149 | it { is_expected.to contain_systemd__manage_dropin('service-90-limits.conf').with_service_entry({ 'LimitNOFILE' => 16_384, 'OOMScoreAdjust' => value }) } |
|
160 | 160 | end |
161 | 161 | end |
162 | 162 |
|
163 | | - context 'on systems with systemd', if: os_facts['systemd'] do |
| 163 | + context 'on Linux', if: os_facts[:kernel] == 'Linux' do |
164 | 164 | it { is_expected.to contain_systemd__manage_dropin('service-90-limits.conf') } |
165 | 165 | end |
166 | 166 |
|
167 | | - context 'on systems without systemd', unless: os_facts['systemd'] do |
| 167 | + context 'on non-Linux', unless: os_facts[:kernel] == 'Linux' do |
168 | 168 | it { is_expected.not_to contain_systemd__manage_dropin('service-90-limits.conf') } |
169 | 169 | end |
170 | 170 |
|
|
1747 | 1747 | } |
1748 | 1748 | end |
1749 | 1749 |
|
1750 | | - context 'on systems with systemd', if: os_facts[:systemd] do |
1751 | | - it do |
1752 | | - is_expected.to contain_service('rabbitmq-server'). |
1753 | | - that_requires('Class[systemd::systemctl::daemon_reload]') |
1754 | | - end |
1755 | | - end |
1756 | | - |
1757 | 1750 | describe 'service with ensure stopped' do |
1758 | 1751 | let :params do |
1759 | 1752 | { service_ensure: 'stopped' } |
|
0 commit comments