2018-11-16 13:06:27 -05:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe 'cinder::coordination' do
|
|
|
|
shared_examples 'cinder::coordination' do
|
|
|
|
context 'with default parameters' do
|
|
|
|
it {
|
2021-05-18 10:05:02 +09:00
|
|
|
is_expected.to contain_oslo__coordination('cinder_config').with(
|
|
|
|
:backend_url => '<SERVICE DEFAULT>'
|
|
|
|
)
|
2018-11-16 13:06:27 -05:00
|
|
|
}
|
|
|
|
end
|
|
|
|
|
|
|
|
context 'with specified parameters' do
|
|
|
|
let :params do
|
|
|
|
{
|
|
|
|
:backend_url => 'etcd3+http://127.0.0.1:2379',
|
|
|
|
}
|
|
|
|
end
|
|
|
|
|
|
|
|
it {
|
2021-05-18 10:05:02 +09:00
|
|
|
is_expected.to contain_oslo__coordination('cinder_config').with(
|
|
|
|
:backend_url => 'etcd3+http://127.0.0.1:2379'
|
|
|
|
)
|
2018-11-16 13:06:27 -05:00
|
|
|
}
|
|
|
|
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
|