From f96467854661ce2522d57e4839cca68a6cd88e2c Mon Sep 17 00:00:00 2001 From: Garrett Honeycutt Date: Mon, 18 Nov 2013 12:55:55 +0100 Subject: [PATCH] Add test for ssh key that runs a command --- spec/classes/init_spec.rb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/spec/classes/init_spec.rb b/spec/classes/init_spec.rb index 339fe3b..9102fac 100644 --- a/spec/classes/init_spec.rb +++ b/spec/classes/init_spec.rb @@ -688,6 +688,13 @@ describe 'ssh' do 'type' => 'dsa', 'key' => 'AAAA==', }, + 'apache_hup' => { + 'ensure' => 'present', + 'user' => 'apachehup', + 'type' => 'dsa', + 'key' => 'AAAA==', + 'options' => 'command="/sbin/service httpd restart"', + }, 'root_for_userY' => { 'ensure' => 'absent', '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 { should contain_ssh_authorized_key('root_for_userY').with({ 'ensure' => 'absent',