Skip to content

Commit be63c07

Browse files
author
Travis Fields
committed
Fix spec tests and update to use stdlib 3.2.x branch for spec acceptance testing
1 parent 8491dd6 commit be63c07

2 files changed

Lines changed: 10 additions & 7 deletions

File tree

spec/classes/ntp_spec.rb

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
let :facts do
1010
super().merge({ :osfamily => 'Linux', :operatingsystem => 'Gentoo' })
1111
end
12+
elsif system == 'Suse'
13+
let :facts do
14+
super().merge({ :osfamily => system,:operatingsystem => 'SLES',:operatingsystemmajrelease => '11' })
15+
end
1216
else
1317
let :facts do
1418
super().merge({ :osfamily => system })
@@ -214,19 +218,19 @@
214218
:servers => ['a', 'b', 'c', 'd'],
215219
:logfile => '/var/log/foobar.log',
216220
}}
217-
221+
218222
it 'should contain logfile setting' do
219223
should contain_file('/etc/ntp.conf').with({
220224
'content' => /^logfile = \/var\/log\/foobar\.log\n/,
221225
})
222226
end
223227
end
224-
228+
225229
context 'when set to false' do
226230
let(:params) {{
227231
:servers => ['a', 'b', 'c', 'd'],
228232
}}
229-
233+
230234
it 'should not contain a logfile line' do
231235
should_not contain_file('/etc/ntp.conf').with({
232236
'content' => /logfile =/,
@@ -289,13 +293,13 @@
289293

290294
describe "on osfamily Suse" do
291295
let :facts do
292-
super().merge({ :osfamily => 'Suse' })
296+
super().merge({ :osfamily => 'Suse', :operatingsystem => 'SLES',:operatingsystemmajrelease => '11' })
293297
end
294298

295299
it 'uses the opensuse ntp servers by default' do
296300
should contain_file('/etc/ntp.conf').with({
297301
'content' => /server \d.opensuse.pool.ntp.org/,
298-
})
302+
})
299303
end
300304
end
301305

spec/spec_helper_acceptance.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@
1919
end
2020
on host, "mkdir -p #{host['distmoduledir']}"
2121
on host, apply_manifest('package{"git":ensure => present}')
22-
on host, 'git clone https://github.com/puppetlabs/puppetlabs-stdlib /etc/puppetlabs/puppet/modules/stdlib'
23-
#on host, puppet('module install puppetlabs-stdlib'), {:acceptable_exit_codes => [0, 1]}
22+
on host, 'git clone -b 3.2.x https://github.com/puppetlabs/puppetlabs-stdlib /etc/puppetlabs/puppet/modules/stdlib'
2423
end
2524
end
2625

0 commit comments

Comments
 (0)