summaryrefslogtreecommitdiff
path: root/spec/system
diff options
context:
space:
mode:
Diffstat (limited to 'spec/system')
-rw-r--r--spec/system/ntp_config_spec.rb8
-rw-r--r--spec/system/preferred_servers_spec.rb20
2 files changed, 24 insertions, 4 deletions
diff --git a/spec/system/ntp_config_spec.rb b/spec/system/ntp_config_spec.rb
index 263bc9d..194cdf1 100644
--- a/spec/system/ntp_config_spec.rb
+++ b/spec/system/ntp_config_spec.rb
@@ -27,9 +27,9 @@ describe 'ntp::config class' do
end
end
- describe file('/etc/ntp.conf') do
- it { should be_file }
- it { should contain line }
- end
+ describe file('/etc/ntp.conf') do
+ it { should be_file }
+ it { should contain line }
+ end
end
diff --git a/spec/system/preferred_servers_spec.rb b/spec/system/preferred_servers_spec.rb
new file mode 100644
index 0000000..686861b
--- /dev/null
+++ b/spec/system/preferred_servers_spec.rb
@@ -0,0 +1,20 @@
+require 'spec_helper_system'
+
+describe 'preferred servers' do
+ it 'applies cleanly' do
+ puppet_apply(%{
+ class { '::ntp':
+ servers => ['a', 'b', 'c', 'd'],
+ preferred_servers => ['c', 'd'],
+ }
+ })
+ end
+
+ describe file('/etc/ntp.conf') do
+ it { should be_file }
+ it { should contain 'server a' }
+ it { should contain 'server b' }
+ it { should contain 'server c prefer' }
+ it { should contain 'server d prefer' }
+ end
+end