Add test coverage for cinder::db::mysql
Currently most of the tests in cinder_db_mysql_spec.rb aren't checking anything, they're just setting up the params framework. This patch will add test coverage for mysql. Change-Id: If10a466821f03ae96e7885840829acd79fc3dcce
This commit is contained in:
parent
c59ecd86a9
commit
b787d7fecd
|
@ -27,6 +27,7 @@ describe 'cinder::db::mysql' do
|
|||
:collate => 'utf8_general_ci',
|
||||
) }
|
||||
end
|
||||
|
||||
describe "overriding allowed_hosts param to array" do
|
||||
let :params do
|
||||
{
|
||||
|
@ -35,7 +36,17 @@ describe 'cinder::db::mysql' do
|
|||
}
|
||||
end
|
||||
|
||||
it { is_expected.to contain_openstacklib__db__mysql('cinder').with(
|
||||
:user => 'cinder',
|
||||
:password_hash => '*1C8A189441ED992638DD234B6711CD5064DA8C6E',
|
||||
:host => '127.0.0.1',
|
||||
:charset => 'utf8',
|
||||
:collate => 'utf8_general_ci',
|
||||
:allowed_hosts => ['127.0.0.1', '%']
|
||||
) }
|
||||
|
||||
end
|
||||
|
||||
describe "overriding allowed_hosts param to string" do
|
||||
let :params do
|
||||
{
|
||||
|
@ -44,6 +55,15 @@ describe 'cinder::db::mysql' do
|
|||
}
|
||||
end
|
||||
|
||||
it { is_expected.to contain_openstacklib__db__mysql('cinder').with(
|
||||
:user => 'cinder',
|
||||
:password_hash => '*0E9E710049E74D36D29D615DFC55F3FFD45413BC',
|
||||
:host => '127.0.0.1',
|
||||
:charset => 'utf8',
|
||||
:collate => 'utf8_general_ci',
|
||||
:allowed_hosts => '192.168.1.1',
|
||||
) }
|
||||
|
||||
end
|
||||
|
||||
describe "overriding allowed_hosts param equals to host param " do
|
||||
|
@ -54,5 +74,15 @@ describe 'cinder::db::mysql' do
|
|||
}
|
||||
end
|
||||
|
||||
it { is_expected.to contain_openstacklib__db__mysql('cinder').with(
|
||||
:user => 'cinder',
|
||||
:password_hash => '*0E9E710049E74D36D29D615DFC55F3FFD45413BC',
|
||||
:host => '127.0.0.1',
|
||||
:charset => 'utf8',
|
||||
:collate => 'utf8_general_ci',
|
||||
:allowed_hosts => '127.0.0.1',
|
||||
) }
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue