|
29 | 29 | context 'with default params' do |
30 | 30 | it { is_expected.not_to contain_class('rabbitmq::repo::apt') } |
31 | 31 | it { is_expected.not_to contain_apt__source('rabbitmq') } |
32 | | - it { is_expected.not_to contain_class('rabbitmq::repo::rhel') } |
33 | | - it { is_expected.not_to contain_yumrepo('rabbitmq') } |
| 32 | + if facts[:os]['family'] == 'RedHat' && facts[:os]['release']['major'] == '8' |
| 33 | + it { is_expected.to contain_class('rabbitmq::repo::rhel') } |
| 34 | + it { is_expected.to contain_yumrepo('rabbitmq') } |
| 35 | + else |
| 36 | + it { is_expected.not_to contain_class('rabbitmq::repo::rhel') } |
| 37 | + it { is_expected.not_to contain_yumrepo('rabbitmq') } |
| 38 | + end |
34 | 39 | end |
35 | 40 |
|
36 | 41 | context 'with service_restart => false' do |
|
206 | 211 | is_expected.to contain_archive('rabbitmqadmin').with_source('http://1.1.1.1:15672/cli/rabbitmqadmin') |
207 | 212 | end |
208 | 213 | end |
209 | | - if %w[RedHat Debian SUSE].include?(facts[:os]['family']) |
| 214 | + if %w[Debian SUSE].include?(facts[:os]['family']) |
210 | 215 | it { is_expected.to contain_package('python') } |
211 | | - end |
212 | 216 | if %w[FreeBSD OpenBSD].include?(facts[:os]['family']) |
213 | 217 | it { is_expected.to contain_package('python2') } |
214 | 218 | end |
| 219 | + if facts[:os]['family'] == 'RedHat' |
| 220 | + if facts[:os]['release']['major'] == '8' |
| 221 | + it { is_expected.to contain_package('python3') } |
| 222 | + else |
| 223 | + it { is_expected.to contain_package('python') } |
| 224 | + end |
| 225 | + end |
215 | 226 | end |
216 | 227 | context 'with manage_python false' do |
217 | 228 | let(:params) { { manage_python: false } } |
|
220 | 231 | is_expected.to contain_class('rabbitmq::install::rabbitmqadmin') |
221 | 232 | is_expected.not_to contain_package('python') |
222 | 233 | is_expected.not_to contain_package('python2') |
| 234 | + is_expected.not_to contain_package('python3') |
223 | 235 | end |
224 | 236 | end |
225 | 237 |
|
|
0 commit comments