puppet-heat/spec/classes/heat_clients_mistral_spec.rb
Takashi Kajinami 0d043d793f Support more clients configurations
This change introduces support for [clients] parameters and
[clients_<service>] parameters, which determine behavior of service
clients used by heat for communication with the OpenStack services.

- Implementation of heat::clients::<service> are generally same.
  Only cinder, heat, keystone and nova provides additional parameters.

- The existing parameters in the base heat class are deprecated in
  favor of the new classes.

Change-Id: Icdf4f0201dd1e5f93a450473709851977ec20034
2022-04-03 23:22:26 +09:00

52 lines
1.4 KiB
Ruby

require 'spec_helper'
describe 'heat::clients::mistral' do
shared_examples 'heat::clients::mistral' do
context 'with defaults' do
it 'configures defaults' do
is_expected.to contain_heat__clients__base('clients_mistral').with(
:endpoint_type => '<SERVICE DEFAULT>',
:ca_file => '<SERVICE DEFAULT>',
:cert_file => '<SERVICE DEFAULT>',
:key_file => '<SERVICE DEFAULT>',
:insecure => '<SERVICE DEFAULT>',
)
end
end
context 'with parameters' do
let :params do
{
:endpoint_type => 'publicURL',
:ca_file => '/path/to/ca.cert',
:cert_file => '/path/to/certfile',
:key_file => '/path/to/key',
:insecure => false,
}
end
it 'configures client parameters' do
is_expected.to contain_heat__clients__base('clients_mistral').with(
:endpoint_type => 'publicURL',
:ca_file => '/path/to/ca.cert',
:cert_file => '/path/to/certfile',
:key_file => '/path/to/key',
:insecure => false,
)
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
it_behaves_like 'heat::clients::mistral'
end
end
end