tests for ssh authorized key
This commit is contained in:
parent
dfc6d99c93
commit
a0e961674b
1 changed files with 22 additions and 0 deletions
22
spec/defines/ssh_authorized_key_spec.rb
Normal file
22
spec/defines/ssh_authorized_key_spec.rb
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
require 'spec_helper'
|
||||||
|
|
||||||
|
describe 'sshd::ssh_authorized_key' do
|
||||||
|
|
||||||
|
context 'add authorized key' do
|
||||||
|
let(:title) { 'foo' }
|
||||||
|
let(:ssh_key) { 'some_secret_ssh_key' }
|
||||||
|
|
||||||
|
let(:params) {{
|
||||||
|
:key => ssh_key,
|
||||||
|
}}
|
||||||
|
|
||||||
|
it { should contain_ssh_authorized_key('foo').with({
|
||||||
|
'ensure' => 'present',
|
||||||
|
'type' => 'ssh-dss',
|
||||||
|
'user' => 'foo',
|
||||||
|
'target' => '/home/foo/.ssh/authorized_keys',
|
||||||
|
'key' => ssh_key,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in a new issue