puppet-cinder/spec/classes/cinder_os_brick_spec.rb
Takashi Kajinami 7ff34516ee Support [os_brick] options
Cinder now supports configuration os-brick specific lock_path. This
adds the new class to manage the [os_brick] option.

Depends-on: https://review.opendev.org/849325
Depends-on: https://review.opendev.org/865771
Change-Id: I72a1cf7b982e96665b1d05170da223ebc4148281
2022-11-28 10:55:52 +09:00

42 lines
919 B
Ruby

require 'spec_helper'
describe 'cinder::os_brick' do
shared_examples 'cinder::os_brick' do
context 'with defaults' do
it 'configures the default values' do
is_expected.to contain_oslo__os_brick('cinder_config').with(
:lock_path => '<SERVICE DEFAULT>',
)
end
end
context 'with parameters overridden' do
let :params do
{
:lock_path => '/var/lib/openstack/lock'
}
end
it 'configures the overridden values' do
is_expected.to contain_oslo__os_brick('cinder_config').with(
:lock_path => '/var/lib/openstack/lock',
)
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
include_examples 'cinder::os_brick'
end
end
end