blob: bd3e35af51779d28a50bf6166fc9707f47b9882a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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
|