Merge "Remove redundantly tested code"
This commit is contained in:
commit
6c4fa4facf
@ -14,7 +14,6 @@ describe 'neutron::db' do
|
||||
:max_overflow => '<SERVICE DEFAULT>',
|
||||
:pool_timeout => '<SERVICE DEFAULT>',
|
||||
)}
|
||||
|
||||
end
|
||||
|
||||
context 'with specific parameters' do
|
||||
@ -43,55 +42,6 @@ describe 'neutron::db' do
|
||||
:max_overflow => '21',
|
||||
:pool_timeout => '21',
|
||||
)}
|
||||
|
||||
end
|
||||
|
||||
context 'with MySQL-python library as backend package' do
|
||||
let :params do
|
||||
{ :database_connection => 'mysql+pymysql://neutron:neutron@localhost/neutron' }
|
||||
end
|
||||
|
||||
it { should contain_oslo__db('neutron_config').with(
|
||||
:connection => 'mysql+pymysql://neutron:neutron@localhost/neutron',
|
||||
)}
|
||||
end
|
||||
|
||||
context 'with postgresql backend' do
|
||||
let :params do
|
||||
{ :database_connection => 'postgresql://neutron:neutron@localhost/neutron', }
|
||||
end
|
||||
|
||||
it 'install the proper backend package' do
|
||||
should contain_package('python-psycopg2').with(:ensure => 'present')
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
context 'with incorrect database_connection string' do
|
||||
let :params do
|
||||
{ :database_connection => 'redis://neutron:neutron@localhost/neutron', }
|
||||
end
|
||||
|
||||
it { should raise_error(Puppet::Error, /validate_re/) }
|
||||
end
|
||||
|
||||
context 'with incorrect database_connection string' do
|
||||
let :params do
|
||||
{ :database_connection => 'foo+pymysql://neutron:neutron@localhost/neutron', }
|
||||
end
|
||||
|
||||
it { should raise_error(Puppet::Error, /validate_re/) }
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
shared_examples 'neutron::db on Debian' do
|
||||
context 'using pymysql driver' do
|
||||
let :params do
|
||||
{ :database_connection => 'mysql+pymysql://neutron:neutron@localhost/neutron' }
|
||||
end
|
||||
|
||||
it { should contain_package('python-pymysql').with({ :ensure => 'present', :name => 'python-pymysql' }) }
|
||||
end
|
||||
end
|
||||
|
||||
@ -104,10 +54,6 @@ describe 'neutron::db' do
|
||||
end
|
||||
|
||||
it_behaves_like 'neutron::db'
|
||||
|
||||
if facts[:osfamily] == 'Debian'
|
||||
it_behaves_like 'neutron::db on Debian'
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user