aboutsummaryrefslogtreecommitdiff
path: root/spec/classes/client_spec.rb
diff options
context:
space:
mode:
authorduritong <peter.meier+github@immerda.ch>2014-02-01 06:52:23 -0800
committerduritong <peter.meier+github@immerda.ch>2014-02-01 06:52:23 -0800
commitdfc6d99c931ae9cba373903b4f9da94ca7db41c1 (patch)
treef83dcf203e6d3132a29b7c56974eeb1139112e18 /spec/classes/client_spec.rb
parentaee6885940cad29ff4ab7437e89c394bc1c19a46 (diff)
parentbf425e96b1acc9c17b51600aeecd34a1d91b62e7 (diff)
downloadpuppet-sshd-dfc6d99c931ae9cba373903b4f9da94ca7db41c1.tar.gz
puppet-sshd-dfc6d99c931ae9cba373903b4f9da94ca7db41c1.tar.bz2
Merge pull request #7 from deric/more-tests
More tests
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