puppet-ceilometer/spec/classes/ceilometer_coordination_spec.rb
Takashi Kajinami 1155b41db0 Use oslo::coordination to manage coordination parameters
This change replaces current implementation about coordination
parameters by oslo::coordination resource type, so that we can gather
all logics related to coordination in a single place.

Depends-on: https://review.opendev.org/791628
Change-Id: I5e0af169ccdb2f4c56318dbc0198f480ab4b15fa
2021-05-21 17:42:39 +09:00

40 lines
907 B
Ruby

require 'spec_helper'
describe 'ceilometer::coordination' do
shared_examples 'ceilometer::coordination' do
context 'with default parameters' do
it {
is_expected.to contain_oslo__coordination('ceilometer_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('ceilometer_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 'ceilometer::coordination'
end
end
end