summaryrefslogtreecommitdiff
path: root/spec/classes/ntp_spec.rb
diff options
context:
space:
mode:
authorAshley Penney <ashley.penney@puppetlabs.com>2013-07-05 19:18:20 -0400
committerAshley Penney <ashley.penney@puppetlabs.com>2013-07-05 19:21:45 -0400
commit82057592fe4e83ed15f1b5a9d4cd652fd0b8e528 (patch)
treeeee45a7edd8ce56cf1790a2a2adabe16f2fe5ca6 /spec/classes/ntp_spec.rb
parent1a199c77dff8569927c65544185f92dfb0a15c46 (diff)
Add Gentoo support. (And reformat archlinux vars)
Diffstat (limited to 'spec/classes/ntp_spec.rb')
-rw-r--r--spec/classes/ntp_spec.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/classes/ntp_spec.rb b/spec/classes/ntp_spec.rb
index c70908a..527c53f 100644
--- a/spec/classes/ntp_spec.rb
+++ b/spec/classes/ntp_spec.rb
@@ -123,6 +123,25 @@ describe 'ntp' do
end
end
+ describe "for operating system Gentoo" do
+
+ let(:params) {{}}
+ let(:facts) { { :operatingsystem => 'Gentoo',
+ :osfamily => 'Linux' } }
+
+ it { should contain_service('ntp').with_name('ntpd') }
+ it { should contain_package('ntp').with_name('net-misc/ntp').with_ensure('present') }
+
+ it 'should use the NTP pool servers by default' do
+ content = param_value(subject, 'file', '/etc/ntp.conf', 'content')
+ expected_lines = [
+ "server 0.gentoo.pool.ntp.org",
+ "server 1.gentoo.pool.ntp.org",
+ "server 2.gentoo.pool.ntp.org",
+ "server 3.gentoo.pool.ntp.org"]
+ (content.split("\n") & expected_lines).should == expected_lines
+ end
+ end
['Debian', 'RedHat','SuSE', 'FreeBSD'].each do |osfamily|
describe "for operating system family #{osfamily}" do