diff options
author | Michael Moll <kvedulv@kvedulv.de> | 2012-10-19 20:26:01 +0200 |
---|---|---|
committer | Michael Moll <kvedulv@kvedulv.de> | 2012-12-10 21:04:36 +0100 |
commit | 12ff9af2ca65af9954212a11536873ef21229991 (patch) | |
tree | 84b50729ecb5f251f29f596020af467c7ceb1a59 /spec | |
parent | 63cc300fb2ff662ae5fbd2268001032c0cabba8c (diff) |
add SuSE support
Diffstat (limited to 'spec')
-rw-r--r-- | spec/classes/ntp_spec.rb | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/spec/classes/ntp_spec.rb b/spec/classes/ntp_spec.rb index 239f641..6ff453f 100644 --- a/spec/classes/ntp_spec.rb +++ b/spec/classes/ntp_spec.rb @@ -43,6 +43,23 @@ describe 'ntp' do end end + describe "for operating system family SuSE" do + + let(:params) {{}} + let(:facts) { { :osfamily => 'suse' } } + + it { should contain_service('ntp').with_name('ntp') } + it 'should use the redhat ntp servers by default' do + content = param_value(subject, 'file', '/etc/ntp.conf', 'content') + expected_lines = [ + 'server 0.opensuse.pool.ntp.org', + 'server 1.opensuse.pool.ntp.org', + 'server 2.opensuse.pool.ntp.org', + 'server 3.opensuse.pool.ntp.org'] + (content.split("\n") & expected_lines).should == expected_lines + end + end + describe "for operating system family FreeBSD" do let(:params) {{}} @@ -51,7 +68,7 @@ describe 'ntp' do it { should contain_service('ntp').with_name('ntpd') } it 'should use the freebsd ntp servers by default' do content = param_value(subject, 'file', '/etc/ntp.conf', 'content') - expected_lines = [ + expected_lines = [ "server 0.freebsd.pool.ntp.org iburst maxpoll 9", "server 1.freebsd.pool.ntp.org iburst maxpoll 9", "server 2.freebsd.pool.ntp.org iburst maxpoll 9", @@ -71,7 +88,7 @@ describe 'ntp' do end - ['Debian', 'RedHat', 'FreeBSD'].each do |osfamily| + ['Debian', 'RedHat','SuSE', 'FreeBSD'].each do |osfamily| describe "for operating system family #{osfamily}" do let(:facts) { { :osfamily => osfamily } } |