Merge "Migrate parameters to the [openstack] section (2)"

This commit is contained in:
Zuul 2022-08-25 08:21:44 +00:00 committed by Gerrit Code Review
commit 3ceffeebde
2 changed files with 19 additions and 12 deletions

View File

@ -51,9 +51,16 @@ class rally::settings (
include rally::settings::watcher
rally_config {
'cleanup/resource_deletion_timeout': value => $resource_deletion_timeout;
'users_context/project_domain': value => $project_domain;
'users_context/resource_management_workers': value => $resource_management_workers;
'users_context/user_domain': value => $user_domain;
'openstack/resource_deletion_timeout': value => $resource_deletion_timeout;
'openstack/project_domain': value => $project_domain;
'openstack/users_context_resource_management_workers': value => $resource_management_workers;
'openstack/user_domain': value => $user_domain;
}
rally_config {
'cleanup/resource_deletion_timeout': ensure => absent;
'users_context/project_domain': ensure => absent;
'users_context/resource_management_workers': ensure => absent;
'users_context/user_domain': ensure => absent;
}
}

View File

@ -19,20 +19,20 @@ describe 'rally::settings' do
shared_examples_for 'with default parameters' do
it 'configures rally settings with default parameters' do
is_expected.to contain_rally_config('cleanup/resource_deletion_timeout').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_rally_config('users_context/project_domain').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_rally_config('users_context/resource_management_workers').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_rally_config('users_context/user_domain').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_rally_config('openstack/resource_deletion_timeout').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_rally_config('openstack/project_domain').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_rally_config('openstack/users_context_resource_management_workers').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_rally_config('openstack/user_domain').with(:value => '<SERVICE DEFAULT>')
end
end
shared_examples_for 'with all parameters' do
before { params.merge!( rally_settings_params ) }
it 'configures rally settings with all parameters' do
is_expected.to contain_rally_config('cleanup/resource_deletion_timeout').with(:value => 600)
is_expected.to contain_rally_config('users_context/project_domain').with(:value => 'default')
is_expected.to contain_rally_config('users_context/resource_management_workers').with(:value => 30)
is_expected.to contain_rally_config('users_context/user_domain').with(:value => 'default')
is_expected.to contain_rally_config('openstack/resource_deletion_timeout').with(:value => 600)
is_expected.to contain_rally_config('openstack/project_domain').with(:value => 'default')
is_expected.to contain_rally_config('openstack/users_context_resource_management_workers').with(:value => 30)
is_expected.to contain_rally_config('openstack/user_domain').with(:value => 'default')
end
end