Avoid testing details of nova::db multiple times
This change drops some redundant test cases which assert functionality of nova::db class from spec files for different classes. The nova::db class has its own spec file and is tested by that. Change-Id: I92fd649b4a546dd74fac81b5a9231712768ec707
This commit is contained in:
parent
d62be4a321
commit
053c6e7729
@ -157,33 +157,6 @@ describe 'nova::api' do
|
||||
it { is_expected.to contain_service('nova-api').without_ensure }
|
||||
end
|
||||
|
||||
context 'with overridden database parameters' do
|
||||
let :pre_condition do
|
||||
"class { 'nova::db':
|
||||
database_connection => 'mysql://user:pass@db/db1',
|
||||
slave_connection => 'mysql://user:pass@slave/db1',
|
||||
api_database_connection => 'mysql://user:pass@db/db2',
|
||||
api_slave_connection => 'mysql://user:pass@slave/db2',
|
||||
database_connection_recycle_time => '30',
|
||||
}
|
||||
class { 'nova::keystone::authtoken':
|
||||
password => 'passw0rd',
|
||||
}
|
||||
"
|
||||
end
|
||||
|
||||
it { is_expected.to contain_oslo__db('api_database').with(
|
||||
:config => 'nova_config',
|
||||
:connection => 'mysql://user:pass@db/db2',
|
||||
:slave_connection => 'mysql://user:pass@slave/db2',
|
||||
) }
|
||||
it { is_expected.to contain_oslo__db('nova_config').with(
|
||||
:connection => 'mysql://user:pass@db/db1',
|
||||
:slave_connection => 'mysql://user:pass@slave/db1',
|
||||
:connection_recycle_time => '30',
|
||||
)}
|
||||
end
|
||||
|
||||
context 'with custom instance_name_template' do
|
||||
before do
|
||||
params.merge!({
|
||||
|
@ -60,23 +60,6 @@ describe 'nova::conductor' do
|
||||
it { is_expected.to contain_nova_config('DEFAULT/enable_new_services').with_value(false) }
|
||||
end
|
||||
|
||||
context 'with overridden database parameters' do
|
||||
let :pre_condition do
|
||||
"class { 'nova::db':
|
||||
database_connection => 'mysql://user:pass@db/db',
|
||||
slave_connection => 'mysql://user:pass@slave/db',
|
||||
database_connection_recycle_time => '30',
|
||||
}
|
||||
"
|
||||
end
|
||||
|
||||
it { is_expected.to contain_oslo__db('nova_config').with(
|
||||
:connection => 'mysql://user:pass@db/db',
|
||||
:slave_connection => 'mysql://user:pass@slave/db',
|
||||
:connection_recycle_time => '30',
|
||||
)}
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
on_supported_os({
|
||||
|
@ -50,33 +50,6 @@ describe 'nova::metadata' do
|
||||
end
|
||||
end
|
||||
|
||||
context 'with overridden database parameters' do
|
||||
let :pre_condition do
|
||||
"class { 'nova::db':
|
||||
database_connection => 'mysql://user:pass@db/db1',
|
||||
slave_connection => 'mysql://user:pass@slave/db1',
|
||||
api_database_connection => 'mysql://user:pass@db/db2',
|
||||
api_slave_connection => 'mysql://user:pass@slave/db2',
|
||||
database_connection_recycle_time => '30',
|
||||
}
|
||||
class { 'nova::keystone::authtoken':
|
||||
password => 'passw0rd',
|
||||
}
|
||||
"
|
||||
end
|
||||
|
||||
it { is_expected.to contain_oslo__db('api_database').with(
|
||||
:config => 'nova_config',
|
||||
:connection => 'mysql://user:pass@db/db2',
|
||||
:slave_connection => 'mysql://user:pass@slave/db2',
|
||||
) }
|
||||
it { is_expected.to contain_oslo__db('nova_config').with(
|
||||
:connection => 'mysql://user:pass@db/db1',
|
||||
:slave_connection => 'mysql://user:pass@slave/db1',
|
||||
:connection_recycle_time => '30',
|
||||
)}
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
on_supported_os({
|
||||
|
@ -130,23 +130,6 @@ describe 'nova::scheduler' do
|
||||
it { is_expected.to contain_nova_config('scheduler/query_placement_for_routed_network_aggregates').with_value(true) }
|
||||
end
|
||||
|
||||
context 'with overridden database parameters' do
|
||||
let :pre_condition do
|
||||
"class { 'nova::db':
|
||||
database_connection => 'mysql://user:pass@db/db',
|
||||
slave_connection => 'mysql://user:pass@slave/db',
|
||||
database_connection_recycle_time => '30',
|
||||
}
|
||||
"
|
||||
end
|
||||
|
||||
it { is_expected.to contain_oslo__db('nova_config').with(
|
||||
:connection => 'mysql://user:pass@db/db',
|
||||
:slave_connection => 'mysql://user:pass@slave/db',
|
||||
:connection_recycle_time => '30',
|
||||
)}
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
on_supported_os({
|
||||
|
Loading…
Reference in New Issue
Block a user