puppet-cinder/spec/classes/cinder_volume_pure_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

63 lines
1.5 KiB
Ruby

require 'spec_helper'
describe 'cinder::volume::pure' do
let :req_params do
{
:san_ip => '127.0.0.2',
:pure_api_token => 'abc123def456ghi789'
}
end
describe 'pure volume driver defaults' do
let :params do
req_params
end
it 'configure pure volume driver' do
is_expected.to contain_cinder__backend__pure('DEFAULT')
end
end
describe 'pure iscsi volume driver' do
let :params do
req_params.merge({
'pure_storage_protocol' => 'iSCSI',
'use_chap_auth' => 'true'
})
end
it 'configure pure volume driver' do
is_expected.to contain_cinder__backend__pure('DEFAULT').with({
:pure_storage_protocol => 'iSCSI',
:use_chap_auth => 'true'
})
end
end
describe 'pure fc volume driver' do
let :params do
req_params.merge({'pure_storage_protocol' => 'FC'})
end
it 'configure pure volume driver' do
is_expected.to contain_cinder__backend__pure('DEFAULT').with({
:pure_storage_protocol => 'FC'
})
end
end
describe 'pure volume driver with additional configuration' do
let :params do
req_params.merge({:extra_options => {'pure_backend/param1' => {'value' => 'value1'}}})
end
it 'configure pure volume with additional configuration' do
is_expected.to contain_cinder__backend__pure('DEFAULT').with({
:extra_options => {'pure_backend/param1' => {'value' => 'value1'}}
})
end
end
end