diff options
author | mh <mh@immerda.ch> | 2014-02-05 23:21:36 +0100 |
---|---|---|
committer | mh <mh@immerda.ch> | 2014-02-05 23:21:36 +0100 |
commit | 253e4f1ceddb8666281c207bb41af1e8a167ee0d (patch) | |
tree | 3fc438ae19120b93656fbc20353825d3d635291d /spec/defines/ssh_authorized_key_spec.rb | |
parent | 15a1a734627e76e9294886a47ce70578fe8436c7 (diff) | |
download | puppet-sshd-253e4f1ceddb8666281c207bb41af1e8a167ee0d.tar.gz puppet-sshd-253e4f1ceddb8666281c207bb41af1e8a167ee0d.tar.bz2 |
add test for options
Diffstat (limited to 'spec/defines/ssh_authorized_key_spec.rb')
-rw-r--r-- | spec/defines/ssh_authorized_key_spec.rb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/spec/defines/ssh_authorized_key_spec.rb b/spec/defines/ssh_authorized_key_spec.rb index 0cc4eb8..c73a91c 100644 --- a/spec/defines/ssh_authorized_key_spec.rb +++ b/spec/defines/ssh_authorized_key_spec.rb @@ -19,4 +19,27 @@ describe 'sshd::ssh_authorized_key' do }) } end + context 'manage authoried key with options' do + let(:title) { 'foo2' } + let(:ssh_key) { 'some_secret_ssh_key' } + + let(:params) {{ + :key => ssh_key, + :options => ['command="/usr/bin/date"', + 'no-pty','no-X11-forwarding','no-agent-forwarding', + 'no-port-forwarding'] + }} + + it { should contain_ssh_authorized_key('foo2').with({ + 'ensure' => 'present', + 'type' => 'ssh-dss', + 'user' => 'foo2', + 'target' => '/home/foo2/.ssh/authorized_keys', + 'key' => ssh_key, + 'options' => ['command="/usr/bin/date"', + 'no-pty','no-X11-forwarding','no-agent-forwarding', + 'no-port-forwarding'] + }) + } + end end |