Merge "Add user & user_role parameters in auth manifest and related tests"

This commit is contained in:
Jenkins 2016-06-23 10:12:48 +00:00 committed by Gerrit Code Review
commit f395489471
2 changed files with 26 additions and 2 deletions

View File

@ -16,6 +16,14 @@
# [*configure_endpoint*]
# Should designate endpoint be configured? Optional. Defaults to 'true'.
#
# [*configure_user*]
# Should designate user be configured?
# Defaults to 'true'.
#
# [*configure_user_role*]
# Should designate user_role be configured?
# Defaults to 'true'.
#
# [*service_name*]
# (optional) Name of the service.
# Defaults to 'designate'.
@ -61,6 +69,8 @@ class designate::keystone::auth (
$service_description = 'Openstack DNSaas Service',
$region = 'RegionOne',
$tenant = 'services',
$configure_user = true,
$configure_user_role = true,
$configure_endpoint = true,
$public_url = 'http://127.0.0.1:9001/v1',
$admin_url = 'http://127.0.0.1:9001/v1',
@ -71,8 +81,8 @@ class designate::keystone::auth (
Service <| name == 'designate-api' |>
keystone::resource::service_identity { 'designate':
configure_user => true,
configure_user_role => true,
configure_user => $configure_user,
configure_user_role => $configure_user_role,
configure_endpoint => $configure_endpoint,
service_name => $service_name,
service_type => $service_type,

View File

@ -66,6 +66,20 @@ describe 'designate::keystone::auth' do
end
describe 'when disabling user and user_role configuration' do
let :params do
{ :configure_user => false,
:configure_user_role => false,
:service_name => 'designate',
:auth_name => 'designate',
:password => 'designate_password' }
end
it { is_expected.to_not contain_keystone_user('designate') }
it { is_expected.to_not contain_keystone_user_role('designate@services') }
it { is_expected.to contain_keystone_service('designate::dns') }
it { is_expected.to contain_keystone_endpoint('RegionOne/designate::dns') }
end
on_supported_os({
:supported_os => OSDefaults.get_supported_os
}).each do |os,facts|