Improve unit test coverage

Validate a few resources which are not covered, to improve test
coverage.
Change-Id: Ie165830609ee5b91fcad324a2b030223c566831e
This commit is contained in:
Takashi Kajinami
2024年05月13日 00:01:09 +09:00
parent f5b84cb0c5
commit 3934ea2d22

View File

@@ -10,8 +10,8 @@ describe 'oslo::db' do
it 'configure oslo_db default params' do
is_expected.to contain_keystone_config('database/sqlite_synchronous').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('database/backend').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('database/connection').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('database/slave_connection').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('database/connection').with_value('<SERVICE DEFAULT>').with_secret(true)
is_expected.to contain_keystone_config('database/slave_connection').with_value('<SERVICE DEFAULT>').with_secret(true)
is_expected.to contain_keystone_config('database/mysql_sql_mode').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('database/connection_recycle_time').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('database/max_pool_size').with_value('<SERVICE DEFAULT>')
@@ -35,7 +35,8 @@ describe 'oslo::db' do
{
:config_group => 'custom_group',
:backend => 'sqlalchemy',
:connection => 'mysql+pymysql://db:db@localhost/db',
:connection => 'mysql+pymysql://db:db@master/db',
:slave_connection => 'mysql+pymysql://db:db@slave/db',
:mysql_sql_mode => 'TRADITIONAL',
:connection_recycle_time => '3601',
:max_pool_size => '100',
@@ -55,8 +56,10 @@ describe 'oslo::db' do
end
it 'configures database parameters' do
is_expected.to contain_keystone_config('custom_group/sqlite_synchronous').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('custom_group/backend').with_value('sqlalchemy')
is_expected.to contain_keystone_config('custom_group/connection').with_value('mysql+pymysql://db:db@localhost/db').with_secret(true)
is_expected.to contain_keystone_config('custom_group/connection').with_value('mysql+pymysql://db:db@master/db').with_secret(true)
is_expected.to contain_keystone_config('custom_group/slave_connection').with_value('mysql+pymysql://db:db@slave/db').with_secret(true)
is_expected.to contain_keystone_config('custom_group/mysql_sql_mode').with_value('TRADITIONAL')
is_expected.to contain_keystone_config('custom_group/connection_recycle_time').with_value('3601')
is_expected.to contain_keystone_config('custom_group/max_pool_size').with_value('100')

View File

@@ -54,7 +54,9 @@ describe 'oslo::privsep' do
is_expected.to contain_keystone_config('mysection/user').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('mysection/group').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('mysection/capabilities').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('mysection/thread_pool_size').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('mysection/helper_command').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('mysection/logger_name').with_value('<SERVICE DEFAULT>')
end
end
Reference in New Issue
openstack/puppet-oslo
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.

The note is not visible to the blocked user.