add tests for default value for nova-scheduler filters
This commit is contained in:
parent
a89621b839
commit
95caf7e19b
@ -43,10 +43,6 @@ describe 'cloud::compute::scheduler' do
|
|||||||
log_facility => 'LOG_LOCAL0' }"
|
log_facility => 'LOG_LOCAL0' }"
|
||||||
end
|
end
|
||||||
|
|
||||||
let :params do
|
|
||||||
{ :scheduler_default_filters => ['RamFilter', 'ComputeFilter'] }
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'configure nova common' do
|
it 'configure nova common' do
|
||||||
should contain_class('nova').with(
|
should contain_class('nova').with(
|
||||||
:verbose => true,
|
:verbose => true,
|
||||||
@ -90,6 +86,13 @@ describe 'cloud::compute::scheduler' do
|
|||||||
should contain_class('nova::scheduler').with(:enabled => true)
|
should contain_class('nova::scheduler').with(:enabled => true)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
shared_examples_for 'openstack compute scheduler with nova-scheduler filters' do
|
||||||
|
let :params do
|
||||||
|
{ :scheduler_default_filters => ['RamFilter', 'ComputeFilter'] }
|
||||||
|
end
|
||||||
|
|
||||||
it 'configure nova-scheduler filters' do
|
it 'configure nova-scheduler filters' do
|
||||||
should contain_class('nova::scheduler::filter').with(
|
should contain_class('nova::scheduler::filter').with(
|
||||||
:scheduler_default_filters => ['RamFilter', 'ComputeFilter']
|
:scheduler_default_filters => ['RamFilter', 'ComputeFilter']
|
||||||
@ -98,7 +101,16 @@ describe 'cloud::compute::scheduler' do
|
|||||||
'value' => "RamFilter,ComputeFilter"
|
'value' => "RamFilter,ComputeFilter"
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
shared_examples_for 'openstack compute scheduler without nova-scheduler filters' do
|
||||||
|
|
||||||
|
it 'not configure nova-scheduler filters' do
|
||||||
|
should contain_class('nova::scheduler::filter').with(
|
||||||
|
:scheduler_default_filters => false
|
||||||
|
)
|
||||||
|
should_not contain_nova_config('scheduler_default_filters')
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'on Debian platforms' do
|
context 'on Debian platforms' do
|
||||||
@ -107,6 +119,18 @@ describe 'cloud::compute::scheduler' do
|
|||||||
end
|
end
|
||||||
|
|
||||||
it_configures 'openstack compute scheduler'
|
it_configures 'openstack compute scheduler'
|
||||||
|
it_configures 'openstack compute scheduler without nova-scheduler filters'
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
context 'on Debian platforms with nova-scheduler filters' do
|
||||||
|
let :facts do
|
||||||
|
{ :osfamily => 'Debian' }
|
||||||
|
end
|
||||||
|
|
||||||
|
it_configures 'openstack compute scheduler'
|
||||||
|
it_configures 'openstack compute scheduler with nova-scheduler filters'
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'on RedHat platforms' do
|
context 'on RedHat platforms' do
|
||||||
@ -114,6 +138,16 @@ describe 'cloud::compute::scheduler' do
|
|||||||
{ :osfamily => 'RedHat' }
|
{ :osfamily => 'RedHat' }
|
||||||
end
|
end
|
||||||
it_configures 'openstack compute scheduler'
|
it_configures 'openstack compute scheduler'
|
||||||
|
it_configures 'openstack compute scheduler without nova-scheduler filters'
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
context 'on RedHat platforms with nova-scheduler filters' do
|
||||||
|
let :facts do
|
||||||
|
{ :osfamily => 'RedHat' }
|
||||||
|
end
|
||||||
|
it_configures 'openstack compute scheduler'
|
||||||
|
it_configures 'openstack compute scheduler with nova-scheduler filters'
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user