conductor: Remove redundant if check
We changed the default value from undef to os_worker fact very long ago[1] but kept the if logic. Because the logic is no longer really required(in case undef is used then it's omitted by puppet), let's remove it to simplify the logic. [1] 9fe9b56aebe01f2e043363c8df8394713602005b Change-Id: I706ad61b10bb914d29092eeb5090ba702857836f
This commit is contained in:
parent
7025f6e5b1
commit
2e08dfc0cd
@ -48,13 +48,8 @@ class nova::conductor(
|
||||
ensure_package => $ensure_package,
|
||||
}
|
||||
|
||||
if $workers {
|
||||
nova_config {
|
||||
'conductor/workers': value => $workers;
|
||||
}
|
||||
}
|
||||
|
||||
nova_config {
|
||||
'DEFAULT/enable_new_services': value => $enable_new_services
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user