Remove redundantly tested code

Remove code that is redundantly tested.

This should not be tested here but in puppet-oslo
where this logic resides.

If we keep this and we do changes in puppet-oslo we
will break these unit tests, this is something we need
to sort out for all modules.

Change-Id: Idf3cbca3446c0ad97308c7c99c32969b4533d118
This commit is contained in:
Tobias Urdin 2019-01-18 10:43:43 +01:00
parent 76de1bcc95
commit 6760510121
1 changed files with 4 additions and 40 deletions

View File

@ -3,6 +3,8 @@ require 'spec_helper'
describe 'mistral::db' do
shared_examples 'mistral::db' do
context 'with default parameters' do
it { should contain_class('mistral::deps') }
it { should contain_oslo__db('mistral_config').with(
:db_max_retries => '<SERVICE DEFAULT>',
:connection => 'sqlite:////var/lib/mistral/mistral.sqlite',
@ -31,6 +33,8 @@ describe 'mistral::db' do
}
end
it { should contain_class('mistral::deps') }
it { should contain_oslo__db('mistral_config').with(
:db_max_retries => '-1',
:connection => 'mysql+pymysql://mistral:mistral@localhost/mistral',
@ -43,46 +47,6 @@ describe 'mistral::db' do
:pool_timeout => '21',
)}
end
context 'with postgresql backend' do
let :params do
{
:database_connection => 'postgresql://mistral:mistral@localhost/mistral'
}
end
it { should contain_package('python-psycopg2').with_ensure('present') }
end
context 'with MySQL-python library as backend package' do
let :params do
{
:database_connection => 'mysql://mistral:mistral@localhost/mistral'
}
end
it { should contain_package('python-mysqldb').with_ensure('present') }
end
context 'with incorrect database_connection string' do
let :params do
{
:database_connection => 'redis://mistral:mistral@localhost/mistral'
}
end
it { should raise_error(Puppet::Error, /validate_re/) }
end
context 'with incorrect pymysql database_connection string' do
let :params do
{
:database_connection => 'foo+pymysql://mistral:mistral@localhost/mistral'
}
end
it { should raise_error(Puppet::Error, /validate_re/) }
end
end
on_supported_os({