|
6 | 6 | :release => '6.0',
|
7 | 7 | :majrelease => '6',
|
8 | 8 | :lsbdistcodename => 'squeeze',
|
9 |
| - :packages => 'molly-guard', |
| 9 | + :packages => 'molly_guard', |
10 | 10 | },
|
11 | 11 | 'debian7' =>
|
12 | 12 | { :osfamily => 'Debian',
|
13 | 13 | :release => '7.0',
|
14 | 14 | :majrelease => '7',
|
15 | 15 | :lsbdistcodename => 'wheezy',
|
16 |
| - :packages => 'molly-guard', |
| 16 | + :packages => 'molly_guard', |
17 | 17 | },
|
18 | 18 | 'debian8' =>
|
19 | 19 | { :osfamily => 'Debian',
|
20 | 20 | :release => '8.0',
|
21 | 21 | :majrelease => '8',
|
22 | 22 | :lsbdistcodename => 'jessie',
|
23 |
| - :packages => 'molly-guard', |
| 23 | + :packages => 'molly_guard', |
24 | 24 | },
|
25 | 25 | 'ubuntu1004' =>
|
26 | 26 | { :osfamily => 'Debian',
|
27 | 27 | :release => '10.04',
|
28 | 28 | :majrelease => '10',
|
29 | 29 | :lsbdistcodename => 'lucid',
|
30 |
| - :packages => 'molly-guard', |
| 30 | + :packages => 'molly_guard', |
31 | 31 | },
|
32 | 32 | 'ubuntu1204' =>
|
33 | 33 | { :osfamily => 'Debian',
|
34 | 34 | :release => '12.04',
|
35 | 35 | :majrelease => '12',
|
36 | 36 | :lsbdistcodename => 'precise',
|
37 |
| - :packages => 'molly-guard', |
| 37 | + :packages => 'molly_guard', |
38 | 38 | },
|
39 | 39 | 'ubuntu1404' =>
|
40 | 40 | { :osfamily => 'Debian',
|
41 | 41 | :release => '14.04',
|
42 | 42 | :majrelease => '14',
|
43 | 43 | :lsbdistcodename => 'trusty',
|
44 |
| - :packages => 'molly-guard', |
| 44 | + :packages => 'molly_guard', |
45 | 45 | },
|
46 | 46 | 'ubuntu1604' =>
|
47 | 47 | { :osfamily => 'Debian',
|
48 | 48 | :release => '16.04',
|
49 | 49 | :majrelease => '16',
|
50 | 50 | :lsbdistcodename => 'xenial',
|
51 |
| - :packages => 'molly-guard', |
| 51 | + :packages => 'molly_guard', |
52 | 52 | },
|
53 | 53 | }
|
54 | 54 |
|
|
92 | 92 | 'owner' => 'root',
|
93 | 93 | 'group' => 'root',
|
94 | 94 | 'mode' => '0644',
|
95 |
| - 'content' => 'template(\'molly_guard/rc.erb\')', |
96 | 95 | })
|
97 | 96 | end
|
98 | 97 |
|
|
118 | 117 |
|
119 | 118 | context 'when package_ensure is set to valid string <absent>' do
|
120 | 119 | let(:params) { { :package_ensure => 'absent' } }
|
121 |
| - it { should contain_package('molly-guard').with_ensure('absent') } |
| 120 | + it { should contain_package('molly_guard').with_ensure('absent') } |
122 | 121 | end
|
123 | 122 |
|
124 | 123 | context 'when package_name is set to valid string <molly-guard>' do
|
125 | 124 | let(:params) { { :package_name => 'molly-guard' } }
|
126 |
| - it { should contain_package('molly-guard').with_name('molly-guard') } |
| 125 | + it { should contain_package('molly_guard').with_name('molly-guard') } |
127 | 126 | end
|
128 | 127 | end
|
129 | 128 |
|
|
135 | 134 | }
|
136 | 135 | end
|
137 | 136 |
|
138 |
| - context 'when EL is unsupported' do |
139 |
| - let :facts do |
140 |
| - { :osfamily => 'RedHat', |
141 |
| - :operatingsystemmajrelease => '4', |
142 |
| - } |
143 |
| - end |
144 |
| - |
145 |
| - it 'should fail' do |
146 |
| - expect do |
147 |
| - should contain_class('molly-guard') |
148 |
| - end.to raise_error(Puppet::Error, /molly_guard doen't support EL\. Detected osfamily is <RedHat>/) |
149 |
| - end |
150 |
| - end |
151 |
| - |
152 |
| - context 'when major release of Debian is unsupported' do |
153 |
| - let :facts do |
154 |
| - { :osfamily => 'Debian', |
155 |
| - :operatingsystemmajrelease => '4', |
156 |
| - :lsbdistcodename => 'etch', |
157 |
| - } |
158 |
| - end |
159 |
| - |
160 |
| - it 'should fail' do |
161 |
| - expect do |
162 |
| - should contain_class('molly_guard') |
163 |
| - end.to raise_error(Puppet::Error, /molly_guard supports Debian 6 \(squeeze\), 7 \(wheezy\) and 8 \(jessie\) and Ubuntu 10\.04 \(lucid\), 12\.04 \(precise\), 14.04 \(trusty\) and 16.04 \(xenial\). Detected lsbdistcodename is <etch>\./) |
164 |
| - end |
165 |
| - end |
166 |
| - |
167 |
| - context 'when major release of Ubuntu is unsupported' do |
168 |
| - let :facts do |
169 |
| - { :osfamily => 'Debian', |
170 |
| - :operatingsystemmajrelease => '8', |
171 |
| - :lsbdistcodename => 'hardy', |
172 |
| - } |
173 |
| - end |
174 |
| - |
175 |
| - it 'should fail' do |
176 |
| - expect do |
177 |
| - should contain_class('molly_guard') |
178 |
| - end.to raise_error(Puppet::Error, /molly_guard supports Debian 6 \(squeeze\), 7 \(wheezy\) and 8 \(jessie\) and Ubuntu 10\.04 \(lucid\), 12\.04 \(precise\), 14.04 \(trusty\) and 16.04 \(xenial\). Detected lsbdistcodename is <hardy>\./) |
179 |
| - end |
180 |
| - end |
181 |
| - |
182 | 137 | context 'when osfamily is unsupported' do
|
183 | 138 | let :facts do
|
184 | 139 | { :osfamily => 'Unsupported',
|
|
0 commit comments