aboutsummaryrefslogtreecommitdiff
path: root/spec/classes/client_spec.rb
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2016-03-19 10:17:30 -0300
committerSilvio Rhatto <rhatto@riseup.net>2016-03-19 10:17:30 -0300
commitff79bc6295e9f089285ccc26c04cc72893a8384f (patch)
tree1a84dad2d03bc3814305eeaedb4cfd8d8dc09f36 /spec/classes/client_spec.rb
parent9b1d0f06fee4b0c457d0154c4153415758c10425 (diff)
parent672b0985d1c2acfde58fecc4c635517522c86268 (diff)
downloadpuppet-sshd-ff79bc6295e9f089285ccc26c04cc72893a8384f.tar.gz
puppet-sshd-ff79bc6295e9f089285ccc26c04cc72893a8384f.tar.bz2
Merge branch 'master' of https://gitlab.com/shared-puppet-modules-group/sshd
Conflicts: README templates/sshd_config/CentOS.erb templates/sshd_config/CentOS_Final.erb templates/sshd_config/Debian_etch.erb templates/sshd_config/Debian_jessie.erb templates/sshd_config/Debian_sid.erb templates/sshd_config/Debian_squeeze.erb templates/sshd_config/Debian_wheezy.erb templates/sshd_config/Ubuntu_trusty.erb
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