puppet-cinder/spec/classes/cinder_coordination_spec.rb
Takashi Kajinami 9078af8559 Use oslo::coordination to manage coordination parameters
This change replaces current implementation to manage coordination
parameters by the base class in puppet-oslo. With this change
the required backend package is installed according to the backend
driver used.

Depends-on: https://review.opendev.org/791628
Change-Id: I210f207d4f05862c98a2ef6d04162880d1cfc4ae
2021-05-18 10:05:02 +09:00

40 lines
884 B
Ruby

require 'spec_helper'
describe 'cinder::coordination' do
shared_examples 'cinder::coordination' do
context 'with default parameters' do
it {
is_expected.to contain_oslo__coordination('cinder_config').with(
:backend_url => '<SERVICE DEFAULT>'
)
}
end
context 'with specified parameters' do
let :params do
{
:backend_url => 'etcd3+http://127.0.0.1:2379',
}
end
it {
is_expected.to contain_oslo__coordination('cinder_config').with(
:backend_url => 'etcd3+http://127.0.0.1:2379'
)
}
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::coordination'
end
end
end