aboutsummaryrefslogtreecommitdiff
path: root/spec/classes/client_spec.rb
diff options
context:
space:
mode:
authorTomas Barton <barton.tomas@gmail.com>2014-01-26 11:33:41 +0100
committerTomas Barton <barton.tomas@gmail.com>2014-01-26 18:26:34 +0100
commit5ce0dcda9776ada2b556f7e1de31702a32a9b318 (patch)
tree446fffb0137b8251a1f143f0c1206d39e14a46b4 /spec/classes/client_spec.rb
parent550e78a4e673e89e5632c5b346952c47debbe36b (diff)
downloadpuppet-sshd-5ce0dcda9776ada2b556f7e1de31702a32a9b318.tar.gz
puppet-sshd-5ce0dcda9776ada2b556f7e1de31702a32a9b318.tar.bz2
client spec
Diffstat (limited to 'spec/classes/client_spec.rb')
-rw-r--r--spec/classes/client_spec.rb42
1 files changed, 42 insertions, 0 deletions
diff --git a/spec/classes/client_spec.rb b/spec/classes/client_spec.rb
new file mode 100644
index 0000000..bd3e35a
--- /dev/null
+++ b/spec/classes/client_spec.rb
@@ -0,0 +1,42 @@
+require 'spec_helper'
+
+describe 'sshd::client' do
+
+ shared_examples "a Linux OS" do
+ it { should contain_file('/etc/ssh/ssh_known_hosts').with(
+ {
+ 'ensure' => 'present',
+ 'owner' => 'root',
+ 'group' => '0',
+ 'mode' => '0644',
+ }
+ )}
+ end
+
+ context "Debian OS" do
+ let :facts do
+ {
+ :operatingsystem => 'Debian',
+ :osfamily => 'Debian',
+ :lsbdistcodename => 'wheezy',
+ }
+ end
+ it_behaves_like "a Linux OS"
+ it { should contain_package('openssh-clients').with({
+ 'name' => 'openssh-client'
+ }) }
+ end
+
+ context "CentOS" do
+ it_behaves_like "a Linux OS" do
+ let :facts do
+ {
+ :operatingsystem => 'CentOS',
+ :osfamily => 'RedHat',
+ :lsbdistcodename => 'Final',
+ }
+ end
+ end
+ end
+
+end \ No newline at end of file