Merge "Switch oslo to use rspec-puppet-facts"
This commit is contained in:
commit
32b8e5d164
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
other:
|
||||
- Tests updated to leverage rspec-puppet-facts for testing
|
||||
multiple OS versions.
|
|
@ -8,7 +8,8 @@ describe 'oslo' do
|
|||
it 'contains the logging class' do
|
||||
is_expected.to contain_class('oslo::params')
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
|
|
@ -4,7 +4,7 @@ describe 'oslo::cache' do
|
|||
|
||||
let (:title) { 'keystone_config' }
|
||||
|
||||
shared_examples 'shared examples' do
|
||||
shared_examples 'oslo-cache' do
|
||||
|
||||
context 'with default parameters' do
|
||||
it 'configure oslo_cache default params' do
|
||||
|
@ -77,19 +77,14 @@ describe 'oslo::cache' do
|
|||
end
|
||||
end
|
||||
|
||||
context 'on a Debian osfamily' do
|
||||
let :facts do
|
||||
@default_facts.merge({ :osfamily => "Debian" })
|
||||
on_supported_os({
|
||||
:supported_os => OSDefaults.get_supported_os
|
||||
}).each do |os,facts|
|
||||
context "on #{os}" do
|
||||
let (:facts) do
|
||||
facts.merge!(OSDefaults.get_facts())
|
||||
end
|
||||
it_behaves_like 'oslo-cache'
|
||||
end
|
||||
|
||||
include_examples 'shared examples'
|
||||
end
|
||||
|
||||
context 'on a RedHat osfamily' do
|
||||
let :facts do
|
||||
@default_facts.merge({ :osfamily => 'RedHat' })
|
||||
end
|
||||
|
||||
include_examples 'shared examples'
|
||||
end
|
||||
end
|
||||
|
|
|
@ -4,7 +4,7 @@ describe 'oslo::concurrency' do
|
|||
|
||||
let (:title) { 'keystone_config' }
|
||||
|
||||
shared_examples 'shared examples' do
|
||||
shared_examples 'oslo-concurrency' do
|
||||
|
||||
context 'with default parameters' do
|
||||
it 'configures oslo_concurrency default params' do
|
||||
|
@ -36,7 +36,7 @@ describe 'oslo::concurrency' do
|
|||
facts.merge!(OSDefaults.get_facts())
|
||||
end
|
||||
|
||||
it_behaves_like 'shared examples'
|
||||
it_behaves_like 'oslo-concurrency'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -4,7 +4,7 @@ describe 'oslo::db' do
|
|||
|
||||
let (:title) { 'keystone_config' }
|
||||
|
||||
shared_examples 'shared examples' do
|
||||
shared_examples 'oslo-db' do
|
||||
|
||||
context 'with default parameters' do
|
||||
it 'configure oslo_db default params' do
|
||||
|
@ -137,15 +137,8 @@ describe 'oslo::db' do
|
|||
end
|
||||
end
|
||||
|
||||
context 'on Debian platforms' do
|
||||
let :facts do
|
||||
@default_facts.merge({ :osfamily => 'Debian',
|
||||
:operatingsystem => 'Debian',
|
||||
:operatingsystemrelease => 'jessie',
|
||||
})
|
||||
end
|
||||
|
||||
context 'using pymysql driver' do
|
||||
shared_examples 'oslo-db on Debian' do
|
||||
context 'using pymysql driver' do
|
||||
let :params do
|
||||
{ :connection => 'mysql+pymysql:///db:db@localhost/db', }
|
||||
end
|
||||
|
@ -172,17 +165,9 @@ describe 'oslo::db' do
|
|||
)
|
||||
end
|
||||
end
|
||||
|
||||
include_examples 'shared examples'
|
||||
end
|
||||
|
||||
context 'on Redhat platforms' do
|
||||
let :facts do
|
||||
@default_facts.merge({ :osfamily => 'RedHat',
|
||||
:operatingsystemrelease => '7.1',
|
||||
})
|
||||
end
|
||||
|
||||
shared_examples 'oslo-db on RedHat' do
|
||||
context 'using pymysql driver' do
|
||||
let :params do
|
||||
{ :connection => 'mysql+pymysql:///db:db@localhost/db', }
|
||||
|
@ -190,7 +175,18 @@ describe 'oslo::db' do
|
|||
|
||||
it { is_expected.not_to contain_package('db_backend_package') }
|
||||
end
|
||||
end
|
||||
|
||||
include_examples 'shared examples'
|
||||
on_supported_os({
|
||||
:supported_os => OSDefaults.get_supported_os
|
||||
}).each do |os,facts|
|
||||
context "on #{os}" do
|
||||
let (:facts) do
|
||||
facts.merge!(OSDefaults.get_facts())
|
||||
end
|
||||
|
||||
it_behaves_like 'oslo-db'
|
||||
it_behaves_like "oslo-db on #{facts[:osfamily]}"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -4,7 +4,7 @@ describe 'oslo::log' do
|
|||
|
||||
let (:title) { 'keystone_config' }
|
||||
|
||||
shared_examples 'shared examples' do
|
||||
shared_examples 'oslo-log' do
|
||||
|
||||
context 'with default parameters' do
|
||||
it 'configure oslo_log default params' do
|
||||
|
@ -89,19 +89,15 @@ describe 'oslo::log' do
|
|||
end
|
||||
end
|
||||
|
||||
context 'on a Debian osfamily' do
|
||||
let :facts do
|
||||
@default_facts.merge({ :osfamily => "Debian" })
|
||||
on_supported_os({
|
||||
:supported_os => OSDefaults.get_supported_os
|
||||
}).each do |os,facts|
|
||||
context "on #{os}" do
|
||||
let (:facts) do
|
||||
facts.merge!(OSDefaults.get_facts())
|
||||
end
|
||||
|
||||
it_behaves_like 'oslo-log'
|
||||
end
|
||||
|
||||
include_examples 'shared examples'
|
||||
end
|
||||
|
||||
context 'on a RedHat osfamily' do
|
||||
let :facts do
|
||||
@default_facts.merge({ :osfamily => 'RedHat' })
|
||||
end
|
||||
|
||||
include_examples 'shared examples'
|
||||
end
|
||||
end
|
||||
|
|
|
@ -4,7 +4,7 @@ describe 'oslo::messaging::amqp' do
|
|||
|
||||
let (:title) { 'keystone_config' }
|
||||
|
||||
shared_examples 'shared examples' do
|
||||
shared_examples 'oslo-messaging-amqp' do
|
||||
|
||||
context 'with default parameters' do
|
||||
it 'configure oslo_messaging_amqp default params' do
|
||||
|
@ -47,19 +47,15 @@ describe 'oslo::messaging::amqp' do
|
|||
end
|
||||
end
|
||||
|
||||
context 'on a Debian osfamily' do
|
||||
let :facts do
|
||||
@default_facts.merge({ :osfamily => "Debian" })
|
||||
on_supported_os({
|
||||
:supported_os => OSDefaults.get_supported_os
|
||||
}).each do |os,facts|
|
||||
context "on #{os}" do
|
||||
let (:facts) do
|
||||
facts.merge!(OSDefaults.get_facts())
|
||||
end
|
||||
|
||||
it_behaves_like 'oslo-messaging-amqp'
|
||||
end
|
||||
|
||||
include_examples 'shared examples'
|
||||
end
|
||||
|
||||
context 'on a RedHat osfamily' do
|
||||
let :facts do
|
||||
@default_facts.merge({ :osfamily => 'RedHat' })
|
||||
end
|
||||
|
||||
include_examples 'shared examples'
|
||||
end
|
||||
end
|
||||
|
|
|
@ -4,7 +4,7 @@ describe 'oslo::messaging::default' do
|
|||
|
||||
let (:title) { 'keystone_config' }
|
||||
|
||||
shared_examples 'DEFAULT examples' do
|
||||
shared_examples 'oslo-messaging-default' do
|
||||
|
||||
context 'with default parameters' do
|
||||
it 'configure DEFAULT default params' do
|
||||
|
@ -40,7 +40,7 @@ describe 'oslo::messaging::default' do
|
|||
facts.merge!(OSDefaults.get_facts())
|
||||
end
|
||||
|
||||
it_behaves_like 'DEFAULT examples'
|
||||
it_behaves_like 'oslo-messaging-default'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -4,7 +4,7 @@ describe 'oslo::messaging::notifications' do
|
|||
|
||||
let (:title) { 'keystone_config' }
|
||||
|
||||
shared_examples 'notifications examples' do
|
||||
shared_examples 'oslo-messaging-notifications' do
|
||||
|
||||
context 'with default parameters' do
|
||||
it 'configure oslo_messaging_notifications default params' do
|
||||
|
@ -53,7 +53,7 @@ describe 'oslo::messaging::notifications' do
|
|||
facts.merge!(OSDefaults.get_facts())
|
||||
end
|
||||
|
||||
it_behaves_like 'notifications examples'
|
||||
it_behaves_like 'oslo-messaging-notifications'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -4,7 +4,7 @@ describe 'oslo::messaging::rabbit' do
|
|||
|
||||
let (:title) { 'keystone_config' }
|
||||
|
||||
shared_examples 'shared examples' do
|
||||
shared_examples 'oslo-messaging-rabbit' do
|
||||
|
||||
context 'with default parameters' do
|
||||
it 'configure oslo_messaging_rabbit default params' do
|
||||
|
@ -199,19 +199,15 @@ describe 'oslo::messaging::rabbit' do
|
|||
end
|
||||
end
|
||||
|
||||
context 'on a Debian osfamily' do
|
||||
let :facts do
|
||||
@default_facts.merge({ :osfamily => "Debian" })
|
||||
on_supported_os({
|
||||
:supported_os => OSDefaults.get_supported_os
|
||||
}).each do |os,facts|
|
||||
context "on #{os}" do
|
||||
let (:facts) do
|
||||
facts.merge!(OSDefaults.get_facts())
|
||||
end
|
||||
|
||||
it_behaves_like 'oslo-messaging-rabbit'
|
||||
end
|
||||
|
||||
include_examples 'shared examples'
|
||||
end
|
||||
|
||||
context 'on a RedHat osfamily' do
|
||||
let :facts do
|
||||
@default_facts.merge({ :osfamily => 'RedHat' })
|
||||
end
|
||||
|
||||
include_examples 'shared examples'
|
||||
end
|
||||
end
|
||||
|
|
|
@ -4,7 +4,7 @@ describe 'oslo::policy' do
|
|||
|
||||
let (:title) { 'keystone_config' }
|
||||
|
||||
shared_examples 'shared examples' do
|
||||
shared_examples 'oslo-policy' do
|
||||
|
||||
context 'with default parameters' do
|
||||
it 'configure oslo_policy default params' do
|
||||
|
@ -51,7 +51,7 @@ describe 'oslo::policy' do
|
|||
facts.merge!(OSDefaults.get_facts())
|
||||
end
|
||||
|
||||
it_behaves_like 'shared examples'
|
||||
it_behaves_like 'oslo-policy'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -4,7 +4,7 @@ describe 'oslo::versionedobjects' do
|
|||
|
||||
let (:title) { 'keystone_config' }
|
||||
|
||||
shared_examples 'shared examples' do
|
||||
shared_examples 'oslo-versionedobjects' do
|
||||
|
||||
context 'with default parameters' do
|
||||
it 'configure oslo_versionedobjects default params' do
|
||||
|
@ -25,19 +25,16 @@ describe 'oslo::versionedobjects' do
|
|||
end
|
||||
end
|
||||
|
||||
context 'on a Debian osfamily' do
|
||||
let :facts do
|
||||
@default_facts.merge({ :osfamily => "Debian" })
|
||||
end
|
||||
on_supported_os({
|
||||
:supported_os => OSDefaults.get_supported_os
|
||||
}).each do |os,facts|
|
||||
context "on #{os}" do
|
||||
let (:facts) do
|
||||
facts.merge!(OSDefaults.get_facts())
|
||||
end
|
||||
|
||||
include_examples 'shared examples'
|
||||
it_behaves_like 'oslo-versionedobjects'
|
||||
end
|
||||
end
|
||||
|
||||
context 'on a RedHat osfamily' do
|
||||
let :facts do
|
||||
@default_facts.merge({ :osfamily => 'RedHat' })
|
||||
end
|
||||
|
||||
include_examples 'shared examples'
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue