Merge "conductor: Remove redundant if check"

This commit is contained in:
Zuul
2023-08-09 07:40:20 +00:00
committed by Gerrit Code Review
2 changed files with 8 additions and 9 deletions

View File

@@ -48,13 +48,8 @@ class nova::conductor(
ensure_package => $ensure_package,
}
if $workers {
nova_config {
'conductor/workers': value => $workers;
}
}
nova_config {
'conductor/workers': value => $workers;
'DEFAULT/enable_new_services': value => $enable_new_services
}
}

View File

@@ -41,11 +41,15 @@ describe 'nova::conductor' do
)}
end
context 'with default workers parameter' do
it { is_expected.to contain_nova_config('conductor/workers').with_value(2) }
end
context 'with overridden workers parameter' do
let :params do
{:workers => '5' }
{:workers => 5 }
end
it { is_expected.to contain_nova_config('conductor/workers').with_value('5') }
it { is_expected.to contain_nova_config('conductor/workers').with_value(5) }
end
context 'with default enable_new_services parameter' do
@@ -67,7 +71,7 @@ describe 'nova::conductor' do
}).each do |os,facts|
context "on #{os}" do
let (:facts) do
facts.merge!(OSDefaults.get_facts())
facts.merge!(OSDefaults.get_facts({ :os_workers => 2 }))
end
let (:platform_params) do