
Note that release note is not added in this change because support for key manager options was added during this cycle. Depends-on: https://review.opendev.org/960389 Change-Id: I7a2d5d9344a53de038fab63569559c6badb77b12 Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
76 lines
2.8 KiB
Ruby
76 lines
2.8 KiB
Ruby
require 'spec_helper'
|
|
|
|
describe 'octavia::key_manager::barbican' do
|
|
shared_examples 'octavia::key_manager::barbican' do
|
|
context 'with default parameters' do
|
|
it {
|
|
is_expected.to contain_oslo__key_manager__barbican('octavia_config').with(
|
|
:barbican_endpoint => '<SERVICE DEFAULT>',
|
|
:barbican_api_version => '<SERVICE DEFAULT>',
|
|
:auth_endpoint => '<SERVICE DEFAULT>',
|
|
:retry_delay => '<SERVICE DEFAULT>',
|
|
:number_of_retries => '<SERVICE DEFAULT>',
|
|
:barbican_endpoint_type => '<SERVICE DEFAULT>',
|
|
:barbican_region_name => '<SERVICE DEFAULT>',
|
|
:send_service_user_token => '<SERVICE DEFAULT>',
|
|
:insecure => '<SERVICE DEFAULT>',
|
|
:cafile => '<SERVICE DEFAULT>',
|
|
:certfile => '<SERVICE DEFAULT>',
|
|
:keyfile => '<SERVICE DEFAULT>',
|
|
:timeout => '<SERVICE DEFAULT>',
|
|
)
|
|
}
|
|
end
|
|
|
|
context 'with specified parameters' do
|
|
let :params do
|
|
{
|
|
:barbican_endpoint => 'http://localhost:9311/',
|
|
:barbican_api_version => 'v1',
|
|
:auth_endpoint => 'http://localhost:5000',
|
|
:retry_delay => 1,
|
|
:number_of_retries => 60,
|
|
:barbican_endpoint_type => 'public',
|
|
:barbican_region_name => 'regionOne',
|
|
:send_service_user_token => true,
|
|
:insecure => false,
|
|
:cafile => 'cafile.pem',
|
|
:certfile => 'certfile.crt',
|
|
:keyfile => 'somekey.key',
|
|
:timeout => 60,
|
|
}
|
|
end
|
|
|
|
it {
|
|
is_expected.to contain_oslo__key_manager__barbican('octavia_config').with(
|
|
:barbican_endpoint => 'http://localhost:9311/',
|
|
:barbican_api_version => 'v1',
|
|
:auth_endpoint => 'http://localhost:5000',
|
|
:retry_delay => 1,
|
|
:number_of_retries => 60,
|
|
:barbican_endpoint_type => 'public',
|
|
:barbican_region_name => 'regionOne',
|
|
:send_service_user_token => true,
|
|
:insecure => false,
|
|
:cafile => 'cafile.pem',
|
|
:certfile => 'certfile.crt',
|
|
:keyfile => 'somekey.key',
|
|
:timeout => 60,
|
|
)
|
|
}
|
|
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 'octavia::key_manager::barbican'
|
|
end
|
|
end
|
|
end
|