summaryrefslogtreecommitdiff
path: root/spec/classes/ntp_spec.rb
diff options
context:
space:
mode:
authorMatt Rogers <mattrogers@sbcglobal.net>2013-01-17 22:57:17 -0600
committerJeff McCune <jeff@puppetlabs.com>2013-02-25 15:27:38 -0800
commit7d6776868eb226bd85372cc1d62c3779b673d25c (patch)
tree4464659fab4d779efb51eba206d20d9ecf47f4c9 /spec/classes/ntp_spec.rb
parent346d9053ba3e4bcc77de2fad6b6eb9665554741a (diff)
Add support for Arch Linux
Add test for package name and presence Fix bad package name for Arch Linux Fix missing comment in config template
Diffstat (limited to 'spec/classes/ntp_spec.rb')
-rw-r--r--spec/classes/ntp_spec.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/classes/ntp_spec.rb b/spec/classes/ntp_spec.rb
index 8f41a22..e74f7c1 100644
--- a/spec/classes/ntp_spec.rb
+++ b/spec/classes/ntp_spec.rb
@@ -88,6 +88,26 @@ describe 'ntp' do
end
+ describe "for operating system Archlinux" do
+
+ let(:params) {{}}
+ let(:facts) { { :operatingsystem => 'Archlinux',
+ :osfamily => 'Linux' } }
+
+ it { should contain_service('ntp').with_name('ntpd') }
+ it { should contain_package('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.pool.ntp.org",
+ "server 1.pool.ntp.org",
+ "server 2.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