oslo middleware: check puppet resource instead of actual config in spec

Change-Id: I71b818c7f30513a3ee4c8efc5329cc9a8d5e61be
This commit is contained in:
ZhongShengping 2018-03-21 11:27:40 +08:00
parent 1079d8628d
commit 225808af24

View File

@ -22,7 +22,9 @@ describe 'mistral::api' do
it { is_expected.to contain_mistral_config('api/api_workers').with_value( params[:api_workers] ) } it { is_expected.to contain_mistral_config('api/api_workers').with_value( params[:api_workers] ) }
it { is_expected.to contain_mistral_config('api/host').with_value( params[:bind_host] ) } it { is_expected.to contain_mistral_config('api/host').with_value( params[:bind_host] ) }
it { is_expected.to contain_mistral_config('api/port').with_value( params[:bind_port] ) } it { is_expected.to contain_mistral_config('api/port').with_value( params[:bind_port] ) }
it { is_expected.to contain_mistral_config('oslo_middleware/enable_proxy_headers_parsing').with_value( params[:enable_proxy_headers_parsing] ) } it { is_expected.to contain_oslo__middleware('mistral_config').with(
:enable_proxy_headers_parsing => params[:enable_proxy_headers_parsing],
)}
it { is_expected.to contain_mistral_config('api/allow_action_execution_deletion').with_value( params[:allow_action_execution_deletion] ) } it { is_expected.to contain_mistral_config('api/allow_action_execution_deletion').with_value( params[:allow_action_execution_deletion] ) }
end end
@ -53,7 +55,9 @@ describe 'mistral::api' do
params.merge!({:enable_proxy_headers_parsing => true }) params.merge!({:enable_proxy_headers_parsing => true })
end end
it { is_expected.to contain_mistral_config('oslo_middleware/enable_proxy_headers_parsing').with_value( params[:enable_proxy_headers_parsing] ) } it { is_expected.to contain_oslo__middleware('mistral_config').with(
:enable_proxy_headers_parsing => params[:enable_proxy_headers_parsing],
)}
end end
context 'with disabled service managing' do context 'with disabled service managing' do