puppet-cinder/spec/classes/cinder_volume_quobyte_spec.rb
Alex Schultz 7142165485 Update tests to leverage rspec-puppet-facts
This change updates the test that currently do Debian/RedHat sets of
tests to use on_supported_os from rspec-puppet-facts. This improves the
over all coverage with the specific CentOS, Debian, RedHat and Ubuntu
flavors of facts.

Change-Id: Ic7b12cd8972bbde0574806acb2d680f14f1c267f
2016-01-18 10:25:18 -07:00

40 lines
1.1 KiB
Ruby

require 'spec_helper'
describe 'cinder::volume::quobyte' do
shared_examples_for 'quobyte volume driver' do
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('DEFAULT/volume_driver').with_value(
'cinder.volume.drivers.quobyte.QuobyteDriver')
is_expected.to contain_cinder_config('DEFAULT/quobyte_volume_url').with_value(
'quobyte://quobyte.cluster.example.com/volume-name')
is_expected.to contain_cinder_config('DEFAULT/quobyte_qcow2_volumes').with_value(
false)
is_expected.to contain_cinder_config('DEFAULT/quobyte_sparsed_volumes').with_value(
true)
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({:processorcount => 8}))
end
it_configures 'quobyte volume driver'
end
end
end