diff --git a/spec/classes/neutron_db_spec.rb b/spec/classes/neutron_db_spec.rb index 34b5a57e8..6b1c5cfb1 100644 --- a/spec/classes/neutron_db_spec.rb +++ b/spec/classes/neutron_db_spec.rb @@ -14,7 +14,6 @@ describe 'neutron::db' do :max_overflow => '', :pool_timeout => '', )} - 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