diff options
author | Tomas Barton <barton.tomas@gmail.com> | 2014-01-26 11:33:41 +0100 |
---|---|---|
committer | Tomas Barton <barton.tomas@gmail.com> | 2014-01-26 18:26:34 +0100 |
commit | 5ce0dcda9776ada2b556f7e1de31702a32a9b318 (patch) | |
tree | 446fffb0137b8251a1f143f0c1206d39e14a46b4 /spec/classes/client_spec.rb | |
parent | 550e78a4e673e89e5632c5b346952c47debbe36b (diff) | |
download | puppet-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.rb | 42 |
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 |