diff --git a/manifests/init.pp b/manifests/init.pp index a96ae64..5e63e6f 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -63,7 +63,7 @@ class ssh ( $ssh_config_sendenv_xmodifiers_real = $ssh_config_sendenv_xmodifiers } default: { - fail("ssh_config_sendenv_xmodifiers type must be true or false.") + fail('ssh_config_sendenv_xmodifiers type must be true or false.') } } diff --git a/spec/classes/init_spec.rb b/spec/classes/init_spec.rb index fa69379..c40c19a 100644 --- a/spec/classes/init_spec.rb +++ b/spec/classes/init_spec.rb @@ -9,9 +9,9 @@ describe 'ssh' do :sshrsakey => 'AAAAB3NzaC1yc2EAAAABIwAAAQEArGElx46pD6NNnlxVaTbp0ZJMgBKCmbTCT3RaeCk0ZUJtQ8wkcwTtqIXmmiuFsynUT0DFSd8UIodnBOPqitimmooAVAiAi30TtJVzADfPScMiUnBJKZajIBkEMkwUcqsfh630jyBvLPE/kyQcxbEeGtbu1DG3monkeymanOBW1AKc5o+cJLXcInLnbowMG7NXzujT3BRYn/9s5vtT1V9cuZJs4XLRXQ50NluxJI7sVfRPVvQI9EMbTS4AFBXUej3yfgaLSV+nPZC/lmJ2gR4t/tKvMFF9m16f8IcZKK7o0rK7v81G/tREbOT5YhcKLK+0wBfR6RsmHzwy4EddZloyLQ==' } end - it { should include_class('ssh')} + it { should contain_class('ssh')} - it { should_not include_class('common')} + it { should_not contain_class('common')} it { should contain_package('ssh_packages').with({ @@ -92,9 +92,9 @@ describe 'ssh' do :sshrsakey => 'AAAAB3NzaC1yc2EAAAABIwAAAQEArGElx46pD6NNnlxVaTbp0ZJMgBKCmbTCT3RaeCk0ZUJtQ8wkcwTtqIXmmiuFsynUT0DFSd8UIodnBOPqitimmooAVAiAi30TtJVzADfPScMiUnBJKZajIBkEMkwUcqsfh630jyBvLPE/kyQcxbEeGtbu1DG3monkeymanOBW1AKc5o+cJLXcInLnbowMG7NXzujT3BRYn/9s5vtT1V9cuZJs4XLRXQ50NluxJI7sVfRPVvQI9EMbTS4AFBXUej3yfgaLSV+nPZC/lmJ2gR4t/tKvMFF9m16f8IcZKK7o0rK7v81G/tREbOT5YhcKLK+0wBfR6RsmHzwy4EddZloyLQ==' } end - it { should include_class('ssh')} + it { should contain_class('ssh')} - it { should_not include_class('common')} + it { should_not contain_class('common')} it { should contain_package('ssh_packages').with({ @@ -176,9 +176,9 @@ describe 'ssh' do :sshrsakey => 'AAAAB3NzaC1yc2EAAAABIwAAAQEArGElx46pD6NNnlxVaTbp0ZJMgBKCmbTCT3RaeCk0ZUJtQ8wkcwTtqIXmmiuFsynUT0DFSd8UIodnBOPqitimmooAVAiAi30TtJVzADfPScMiUnBJKZajIBkEMkwUcqsfh630jyBvLPE/kyQcxbEeGtbu1DG3monkeymanOBW1AKc5o+cJLXcInLnbowMG7NXzujT3BRYn/9s5vtT1V9cuZJs4XLRXQ50NluxJI7sVfRPVvQI9EMbTS4AFBXUej3yfgaLSV+nPZC/lmJ2gR4t/tKvMFF9m16f8IcZKK7o0rK7v81G/tREbOT5YhcKLK+0wBfR6RsmHzwy4EddZloyLQ==' } end - it { should include_class('ssh')} + it { should contain_class('ssh')} - it { should_not include_class('common')} + it { should_not contain_class('common')} it { should contain_package('ssh_packages').with({ @@ -260,9 +260,9 @@ describe 'ssh' do :sshrsakey => 'AAAAB3NzaC1yc2EAAAABIwAAAQEArGElx46pD6NNnlxVaTbp0ZJMgBKCmbTCT3RaeCk0ZUJtQ8wkcwTtqIXmmiuFsynUT0DFSd8UIodnBOPqitimmooAVAiAi30TtJVzADfPScMiUnBJKZajIBkEMkwUcqsfh630jyBvLPE/kyQcxbEeGtbu1DG3monkeymanOBW1AKc5o+cJLXcInLnbowMG7NXzujT3BRYn/9s5vtT1V9cuZJs4XLRXQ50NluxJI7sVfRPVvQI9EMbTS4AFBXUej3yfgaLSV+nPZC/lmJ2gR4t/tKvMFF9m16f8IcZKK7o0rK7v81G/tREbOT5YhcKLK+0wBfR6RsmHzwy4EddZloyLQ==' } end - it { should include_class('ssh')} + it { should contain_class('ssh')} - it { should_not include_class('common')} + it { should_not contain_class('common')} it { should contain_package('ssh_packages').with({ @@ -350,7 +350,7 @@ describe 'ssh' do it 'should fail' do expect { - should include_class('ssh') + should contain_class('ssh') }.to raise_error(Puppet::Error,/ssh supports osfamilies RedHat, Suse and Debian. Detected osfamily is ./) end end @@ -462,9 +462,9 @@ describe 'ssh' do { :manage_root_ssh_config => 'true' } end - it { should include_class('ssh')} + it { should contain_class('ssh')} - it { should include_class('common')} + it { should contain_class('common')} it { should contain_file('root_ssh_dir').with({ @@ -521,7 +521,7 @@ describe 'ssh' do it 'should fail' do expect { - should include_class('ssh') + should contain_class('ssh') }.to raise_error(Puppet::Error,/sshd_config_port must be a valid number and is set to <22invalid>./) end end @@ -541,7 +541,7 @@ describe 'ssh' do it 'should fail' do expect { - should include_class('ssh') + should contain_class('ssh') }.to raise_error(Puppet::Error,/manage_root_ssh_config is and must be \'true\' or \'false\'./) end end @@ -560,7 +560,7 @@ describe 'ssh' do it 'should fail' do expect { - should include_class('ssh') + should contain_class('ssh') }.to raise_error(Puppet::Error,/sshd_password_authentication may be either \'yes\' or \'no\' and is set to ./) end end @@ -579,7 +579,7 @@ describe 'ssh' do it 'should fail' do expect { - should include_class('ssh') + should contain_class('ssh') }.to raise_error(Puppet::Error,/sshd_allow_tcp_forwarding may be either \'yes\' or \'no\' and is set to ./) end end @@ -598,7 +598,7 @@ describe 'ssh' do it 'should fail' do expect { - should include_class('ssh') + should contain_class('ssh') }.to raise_error(Puppet::Error,/sshd_x11_forwarding may be either \'yes\' or \'no\' and is set to ./) end end @@ -617,7 +617,7 @@ describe 'ssh' do it 'should fail' do expect { - should include_class('ssh') + should contain_class('ssh') }.to raise_error(Puppet::Error,/sshd_use_pam may be either \'yes\' or \'no\' and is set to ./) end end @@ -636,7 +636,7 @@ describe 'ssh' do it 'should fail' do expect { - should include_class('ssh') + should contain_class('ssh') }.to raise_error(Puppet::Error,/sshd_client_alive_interval must be an integer and is set to ./) end end @@ -655,7 +655,7 @@ describe 'ssh' do it 'should fail' do expect { - should include_class('ssh') + should contain_class('ssh') }.to raise_error(Puppet::Error,/ssh_config_sendenv_xmodifiers type must be true or false./) end end @@ -689,9 +689,9 @@ describe 'ssh' do { :manage_firewall => true } end - it { should include_class('ssh')} + it { should contain_class('ssh')} - it { should_not include_class('common')} + it { should_not contain_class('common')} it { should contain_firewall('22 open port 22 for SSH').with({ @@ -759,7 +759,7 @@ describe 'ssh' do it 'should fail' do expect { - should include_class('ssh') + should contain_class('ssh') }.to raise_error(Puppet::Error) end end