2013-12-04 12:29:02 -08:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe 'cinder::vmware' do
|
2018-11-04 22:52:43 +01:00
|
|
|
shared_examples 'cinder::vmware' do
|
|
|
|
context 'with defaults' do
|
2019-03-04 20:08:44 +00:00
|
|
|
it { is_expected.to contain_cinder_type('vmware-thin').with(
|
2018-11-04 22:52:43 +01:00
|
|
|
:ensure => :present,
|
|
|
|
:properties => ['vmware:vmdk_type=thin']
|
|
|
|
)}
|
2013-12-04 12:29:02 -08:00
|
|
|
|
2019-03-04 20:08:44 +00:00
|
|
|
it { is_expected.to contain_cinder_type('vmware-thick').with(
|
2018-11-04 22:52:43 +01:00
|
|
|
:ensure => :present,
|
|
|
|
:properties => ['vmware:vmdk_type=thick']
|
|
|
|
)}
|
2013-12-04 12:29:02 -08:00
|
|
|
|
2019-03-04 20:08:44 +00:00
|
|
|
it { is_expected.to contain_cinder_type('vmware-eagerZeroedThick').with(
|
2018-11-04 22:52:43 +01:00
|
|
|
:ensure => :present,
|
|
|
|
:properties => ['vmware:vmdk_type=eagerZeroedThick']
|
|
|
|
)}
|
2013-12-04 12:29:02 -08:00
|
|
|
|
2019-03-04 20:08:44 +00:00
|
|
|
it { is_expected.to contain_cinder_type('vmware-full').with(
|
2018-11-04 22:52:43 +01:00
|
|
|
:ensure => :present,
|
|
|
|
:properties => ['vmware:clone_type=full']
|
|
|
|
)}
|
2013-12-04 12:29:02 -08:00
|
|
|
|
2019-03-04 20:08:44 +00:00
|
|
|
it { is_expected.to contain_cinder_type('vmware-linked').with(
|
2018-11-04 22:52:43 +01:00
|
|
|
:ensure => :present,
|
|
|
|
:properties => ['vmware:clone_type=linked']
|
|
|
|
)}
|
|
|
|
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())
|
|
|
|
end
|
2013-12-04 12:29:02 -08:00
|
|
|
|
2018-11-04 22:52:43 +01:00
|
|
|
it_behaves_like 'cinder::vmware'
|
2013-12-04 12:29:02 -08:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|