Add test for ssh key that runs a command
This commit is contained in:
parent
7250ad514e
commit
f964678546
@ -688,6 +688,13 @@ describe 'ssh' do
|
|||||||
'type' => 'dsa',
|
'type' => 'dsa',
|
||||||
'key' => 'AAAA==',
|
'key' => 'AAAA==',
|
||||||
},
|
},
|
||||||
|
'apache_hup' => {
|
||||||
|
'ensure' => 'present',
|
||||||
|
'user' => 'apachehup',
|
||||||
|
'type' => 'dsa',
|
||||||
|
'key' => 'AAAA==',
|
||||||
|
'options' => 'command="/sbin/service httpd restart"',
|
||||||
|
},
|
||||||
'root_for_userY' => {
|
'root_for_userY' => {
|
||||||
'ensure' => 'absent',
|
'ensure' => 'absent',
|
||||||
'user' => 'root',
|
'user' => 'root',
|
||||||
@ -703,6 +710,16 @@ describe 'ssh' do
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
it {
|
||||||
|
should contain_ssh_authorized_key('apache_hup').with({
|
||||||
|
'ensure' => 'present',
|
||||||
|
'user' => 'apachehup',
|
||||||
|
'type' => 'dsa',
|
||||||
|
'key' => 'AAAA==',
|
||||||
|
'options' => 'command="/sbin/service httpd restart"',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
it {
|
it {
|
||||||
should contain_ssh_authorized_key('root_for_userY').with({
|
should contain_ssh_authorized_key('root_for_userY').with({
|
||||||
'ensure' => 'absent',
|
'ensure' => 'absent',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user