Project

General

Profile

« Previous | Next » 

Revision a1766664

Added by Marek Hulán about 7 years ago

Fixes #18215 - Install REX SSH key

View differences:

spec/classes/foreman_proxy__plugin__remote_execution__ssh_spec.rb
:command => "/usr/bin/ssh-keygen -f /usr/share/foreman-proxy/.ssh/id_rsa_foreman_proxy -N ''"
})
end
it 'should not install the ssh key' do
should_not contain_file('/root/.ssh')
end
end
describe 'with override parameters' do
......
:generate_keys => false,
:ssh_identity_dir => '/usr/share/foreman-proxy/.ssh-rex',
:ssh_identity_file => 'id_rsa',
:install_key => true,
} end
it { should contain_foreman_proxy__plugin('dynflow') }
......
end
it { should_not contain_exec('generate_ssh_key') }
it { should_not contain_file('/root/.ssh') }
end
describe 'with ssh key generating and installation' do
let :pre_condition do
"include foreman_proxy"
end
let :params do {
:enabled => true,
:listen_on => 'http',
:local_working_dir => '/tmp',
:remote_working_dir => '/tmp',
:generate_keys => true,
:ssh_identity_dir => '/usr/share/foreman-proxy/.ssh-rex',
:ssh_identity_file => 'id_rsa',
:install_key => true,
} end
it { should contain_exec('generate_ssh_key') }
it { should contain_file('/root/.ssh') }
end
end

Also available in: Unified diff