Files
puppet-mistral/spec/classes/mistral_coordination_spec.rb
Takashi Kajinami 298c6ec174 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: I5c2653475bbbf6dc0a9ce795958fd884bcdf13e8
2021-07-06 20:38:08 +09:00

43 lines
1.1 KiB
Ruby

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