|
36 | 36 | it { is_expected.to contain_package('rabbitmq-server-plugins') } if os_facts[:os]['family'] == 'Suse' |
37 | 37 |
|
38 | 38 | context 'with default params' do |
39 | | - it { is_expected.not_to contain_class('rabbitmq::repo::apt') } |
40 | | - it { is_expected.not_to contain_apt__source('rabbitmq') } |
41 | | - it { is_expected.not_to contain_class('rabbitmq::repo::rhel') } |
42 | | - it { is_expected.not_to contain_yumrepo('rabbitmq') } |
43 | | - end |
44 | | - |
45 | | - context 'with service_restart => false' do |
46 | | - let(:params) { { service_restart: false } } |
47 | | - |
48 | | - it { is_expected.not_to contain_class('rabbitmq::config').that_notifies('Class[rabbitmq::service]') } |
49 | | - end |
50 | | - |
51 | | - context 'with repos_ensure => true' do |
52 | | - let(:params) { { repos_ensure: true } } |
53 | | - |
54 | 39 | if os_facts[:os]['family'] == 'Debian' |
55 | 40 | it 'includes rabbitmq::repo::apt' do |
56 | 41 | is_expected.to contain_class('rabbitmq::repo::apt'). |
|
85 | 70 | end |
86 | 71 | end |
87 | 72 |
|
| 73 | + context 'with service_restart => false' do |
| 74 | + let(:params) { { service_restart: false } } |
| 75 | + |
| 76 | + it { is_expected.not_to contain_class('rabbitmq::config').that_notifies('Class[rabbitmq::service]') } |
| 77 | + end |
| 78 | + |
| 79 | + context 'with repos_ensure => false' do |
| 80 | + let(:params) { { repos_ensure: false } } |
| 81 | + |
| 82 | + it { is_expected.not_to contain_class('rabbitmq::repo::apt') } |
| 83 | + it { is_expected.not_to contain_apt__source('rabbitmq') } |
| 84 | + it { is_expected.not_to contain_class('rabbitmq::repo::rhel') } |
| 85 | + it { is_expected.not_to contain_yumrepo('rabbitmq') } |
| 86 | + end |
| 87 | + |
88 | 88 | context 'with no pin', if: os_facts[:os]['family'] == 'Debian' do |
89 | | - let(:params) { { repos_ensure: true, package_apt_pin: '' } } |
| 89 | + let(:params) { { package_apt_pin: '' } } |
90 | 90 |
|
91 | 91 | describe 'it sets up an apt::source' do |
92 | 92 | it { |
|
100 | 100 | end |
101 | 101 |
|
102 | 102 | context 'with pin', if: os_facts[:os]['family'] == 'Debian' do |
103 | | - let(:params) { { repos_ensure: true, package_apt_pin: '700' } } |
| 103 | + let(:params) { { package_apt_pin: '700' } } |
104 | 104 |
|
105 | 105 | describe 'it sets up an apt::source and pin' do |
106 | 106 | it { |
|
245 | 245 | is_expected.to contain_class('rabbitmq::install::rabbitmqadmin') |
246 | 246 | is_expected.not_to contain_package('python') |
247 | 247 | is_expected.not_to contain_package('python2') |
| 248 | + is_expected.not_to contain_package('python3') |
248 | 249 | end |
249 | 250 | end |
250 | 251 |
|
|
0 commit comments