puppet-cinder/spec/defines/cinder_backend_quobyte_spec.rb
Maksym Yatsenko 4fcd49b592 Change worker defaults to ::os_workers
This patch changes the default worker count from ::processorcount to the
new ::os_workers fact. ::os_workers is based on the number of processors
(currently cpu/4) but is capped at a maximum of 8 worker processors.
This is a much more reasonable default in general and prevents excessive
resource consumption on systems with a large number of CPUs.

Change-Id: I159bb64d024c2207526c73212d68230d8362164c
2016-10-06 20:09:02 +03:00

50 lines
1.5 KiB
Ruby

require 'spec_helper'
describe 'cinder::backend::quobyte' do
shared_examples_for 'quobyte volume driver' do
let(:title) {'myquobyte'}
let :params do
{
:quobyte_volume_url => 'quobyte://quobyte.cluster.example.com/volume-name',
:quobyte_qcow2_volumes => false,
:quobyte_sparsed_volumes => true,
}
end
it 'configures quobyte volume driver' do
is_expected.to contain_cinder_config('myquobyte/volume_driver').with_value(
'cinder.volume.drivers.quobyte.QuobyteDriver')
is_expected.to contain_cinder_config('myquobyte/quobyte_volume_url').with_value(
'quobyte://quobyte.cluster.example.com/volume-name')
is_expected.to contain_cinder_config('myquobyte/quobyte_qcow2_volumes').with_value(
false)
is_expected.to contain_cinder_config('myquobyte/quobyte_sparsed_volumes').with_value(
true)
end
context 'quobyte backend with cinder type' do
before do
params.merge!({:manage_volume_type => true})
end
it 'should create type with properties' do
should contain_cinder_type('myquobyte').with(:ensure => :present, :properties => ['volume_backend_name=myquobyte'])
end
end
end
on_supported_os({
:supported_os => OSDefaults.get_supported_os
}).each do |os,facts|
context "on #{os}" do
let (:facts) do
facts.merge(OSDefaults.get_facts({:os_workers => 8}))
end
it_configures 'quobyte volume driver'
end
end
end