From c6c85ed325b87d373217f13fef0753f2f0cf3b2a Mon Sep 17 00:00:00 2001 From: Phil Friderici Date: Wed, 11 Dec 2013 14:45:53 +0100 Subject: [PATCH] fixing spec warnings --- manifests/init.pp | 2 +- spec/classes/init_spec.rb | 44 +++++++++++++++++++-------------------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index 67a7bff..6086278 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -61,7 +61,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 fe39e47..0f629a3 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({ @@ -91,9 +91,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({ @@ -174,9 +174,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({ @@ -257,9 +257,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({ @@ -346,7 +346,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 @@ -456,9 +456,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({ @@ -496,7 +496,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 @@ -516,7 +516,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 @@ -535,7 +535,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 @@ -554,7 +554,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 @@ -573,7 +573,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 @@ -592,7 +592,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 @@ -611,7 +611,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 @@ -630,7 +630,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 @@ -664,9 +664,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({ @@ -734,7 +734,7 @@ describe 'ssh' do it 'should fail' do expect { - should include_class('ssh') + should contain_class('ssh') }.to raise_error(Puppet::Error) end end