Project

General

Profile

« Previous | Next » 

Revision 45b8161d

Added by Daniel Lobato GarcĂ­a over 7 years ago

Fixes #17631 - Validate puppetrun and realm providers

This commit adds checks for the puppetrun/realms providers so that they
have to be compliant with a certain regex in order to be accepted as
parameters.

View differences:

spec/classes/foreman_proxy__config__spec.rb
end
end
context 'with invalid realm provider' do
let :pre_condition do
'class {"foreman_proxy":
realm => true,
realm_provider => "invalid",
}'
end
it { expect { subject.call } .to raise_error(/Invalid provider: choose freeipa/) }
end
context 'with tftp_managed enabled and tftp_syslinux_filenames set' do
let :pre_condition do
'class {"foreman_proxy":
......
end
end
context 'when puppetrun_provider => invalid' do
let :pre_condition do
'class {"foreman_proxy":
puppetrun_provider => "invalid",
}'
end
it { expect { subject.call } .to raise_error(/Invalid provider: choose puppetrun, mcollective, ssh, salt or customrun/) }
end
context 'with puppet use_cache enabled' do
let :pre_condition do
'class {"foreman_proxy":

Also available in: Unified diff