|
9 | 9 | let :facts do |
10 | 10 | super().merge({ :osfamily => 'Linux', :operatingsystem => 'Gentoo' }) |
11 | 11 | end |
| 12 | + elsif system == 'Suse' |
| 13 | + let :facts do |
| 14 | + super().merge({ :osfamily => system,:operatingsystem => 'SLES',:operatingsystemmajrelease => '11' }) |
| 15 | + end |
12 | 16 | else |
13 | 17 | let :facts do |
14 | 18 | super().merge({ :osfamily => system }) |
|
214 | 218 | :servers => ['a', 'b', 'c', 'd'], |
215 | 219 | :logfile => '/var/log/foobar.log', |
216 | 220 | }} |
217 | | - |
| 221 | + |
218 | 222 | it 'should contain logfile setting' do |
219 | 223 | should contain_file('/etc/ntp.conf').with({ |
220 | 224 | 'content' => /^logfile = \/var\/log\/foobar\.log\n/, |
221 | 225 | }) |
222 | 226 | end |
223 | 227 | end |
224 | | - |
| 228 | + |
225 | 229 | context 'when set to false' do |
226 | 230 | let(:params) {{ |
227 | 231 | :servers => ['a', 'b', 'c', 'd'], |
228 | 232 | }} |
229 | | - |
| 233 | + |
230 | 234 | it 'should not contain a logfile line' do |
231 | 235 | should_not contain_file('/etc/ntp.conf').with({ |
232 | 236 | 'content' => /logfile =/, |
|
289 | 293 |
|
290 | 294 | describe "on osfamily Suse" do |
291 | 295 | let :facts do |
292 | | - super().merge({ :osfamily => 'Suse' }) |
| 296 | + super().merge({ :osfamily => 'Suse', :operatingsystem => 'SLES',:operatingsystemmajrelease => '11' }) |
293 | 297 | end |
294 | 298 |
|
295 | 299 | it 'uses the opensuse ntp servers by default' do |
296 | 300 | should contain_file('/etc/ntp.conf').with({ |
297 | 301 | 'content' => /server \d.opensuse.pool.ntp.org/, |
298 | | - }) |
| 302 | + }) |
299 | 303 | end |
300 | 304 | end |
301 | 305 |
|
|
0 commit comments