Project

General

Profile

« Previous | Next » 

Revision c8c658e1

Added by Dominic Cleal about 8 years ago

Pass ssl_ca into foreman_smartproxy during registration

closes GH-232

View differences:

spec/classes/foreman_proxy__register__spec.rb
'url' => "https://#{facts[:fqdn]}:8443",
'consumer_key' => /\w+/,
'consumer_secret' => /\w+/,
'ssl_ca' => /\A\/.+\.pem\z/,
})
end
end
......
end
end
describe 'with foreman_ssl_ca override' do
let :pre_condition do
"class {'foreman_proxy':
register_in_foreman => true,
foreman_ssl_ca => '/etc/foreman/ssl/ca.pem',
}"
end
it 'should register the proxy' do
should contain_class('foreman_proxy::register')
should contain_foreman_smartproxy(facts[:fqdn]).with({
'ensure' => 'present',
'ssl_ca' => '/etc/foreman/ssl/ca.pem',
})
end
end
describe 'with ssl_ca override' do
let :pre_condition do
"class {'foreman_proxy':
register_in_foreman => true,
ssl_ca => '/etc/foreman/ssl/ca.pem',
}"
end
it 'should register the proxy' do
should contain_class('foreman_proxy::register')
should contain_foreman_smartproxy(facts[:fqdn]).with({
'ensure' => 'present',
'ssl_ca' => '/etc/foreman/ssl/ca.pem',
})
end
end
describe 'disabled' do
let :pre_condition do
"class {'foreman_proxy': register_in_foreman => false}"

Also available in: Unified diff