puppet-cinder/spec/defines/cinder_qos_spec.rb
SolKuczala ae0c571a52 Convert specs to RSpec 3.8.0 syntax with Transpec
This conversion is done by Transpec 3.4.0
This patch complements c09a93456eb806f0cdb6e858470334413ac61ea6
adding all files inside defines/ dir.

Partial-Bug: #1816857
Change-Id: Ic00f8b38c5b84ff19fc945512f4f13aa11221c8b
2019-03-08 20:18:29 +00:00

42 lines
1009 B
Ruby

require 'spec_helper'
describe 'cinder::qos' do
let(:title) {'tomato'}
shared_examples 'cinder::qos' do
context 'with default parameters' do
it { is_expected.to contain_cinder_qos('tomato').with_ensure('present') }
end
context 'with specified parameters' do
let :params do
{
:properties => ['var1=value1', 'var2=value2'],
:associations => ['vol_type1', 'vol_type2'],
:consumer => 'front-end',
}
end
it { is_expected.to contain_cinder_qos('tomato').with(
:ensure => 'present',
:properties => ['var1=value1', 'var2=value2'],
:associations => ['vol_type1', 'vol_type2'],
:consumer => 'front-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())
end
it_behaves_like 'cinder::qos'
end
end
end