From 953d77a3270f2158d4c2e1461ff68b390bb2bdb4 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Sun, 8 Sep 2019 22:30:16 +0900 Subject: [PATCH] Add missing tests for module import in nova There are some imodules imported in tripleo::profile::base::nova, and tripleo::profile::base::nova::api but not tested. Add missing these teses, so that we can check all includes are working as expected Trivial-fix Change-Id: Ieca24f03e612859b59913e766f232d957569449e --- .../classes/tripleo_profile_base_nova_api_spec.rb | 15 ++++++++++----- spec/classes/tripleo_profile_base_nova_spec.rb | 12 ++++++++++++ 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/spec/classes/tripleo_profile_base_nova_api_spec.rb b/spec/classes/tripleo_profile_base_nova_api_spec.rb index 3a2a6859d..1c3373658 100644 --- a/spec/classes/tripleo_profile_base_nova_api_spec.rb +++ b/spec/classes/tripleo_profile_base_nova_api_spec.rb @@ -42,8 +42,9 @@ eos is_expected.to contain_class('tripleo::profile::base::nova') is_expected.to_not contain_class('nova::keystone::authtoken') is_expected.to_not contain_class('nova::api') - is_expected.to_not contain_class('nova::wsgi::apache_api') + is_expected.to_not contain_class('nova::cors') is_expected.to_not contain_class('nova::network::neutron') + is_expected.to_not contain_class('nova::wsgi::apache_api') } end @@ -59,8 +60,9 @@ eos is_expected.to contain_class('nova::cell_v2::simple_setup') is_expected.to contain_class('nova::keystone::authtoken') is_expected.to contain_class('nova::api') - is_expected.to_not contain_class('nova::wsgi::apache_api') + is_expected.to contain_class('nova::cors') is_expected.to contain_class('nova::network::neutron') + is_expected.to_not contain_class('nova::wsgi::apache_api') } end @@ -76,8 +78,9 @@ eos is_expected.to contain_class('nova::cell_v2::simple_setup') is_expected.to contain_class('nova::keystone::authtoken') is_expected.to contain_class('nova::api') - is_expected.to_not contain_class('nova::wsgi::apache_api') + is_expected.to contain_class('nova::cors') is_expected.to contain_class('nova::network::neutron') + is_expected.to_not contain_class('nova::wsgi::apache_api') } end @@ -91,8 +94,9 @@ eos is_expected.to_not contain_class('nova::db::sync_cell_v2') is_expected.to contain_class('nova::keystone::authtoken') is_expected.to contain_class('nova::api') - is_expected.to_not contain_class('nova::wsgi::apache_api') + is_expected.to contain_class('nova::cors') is_expected.to contain_class('nova::network::neutron') + is_expected.to_not contain_class('nova::wsgi::apache_api') } end @@ -109,8 +113,9 @@ eos is_expected.to_not contain_class('nova::db::sync_cell_v2') is_expected.to contain_class('nova::keystone::authtoken') is_expected.to contain_class('nova::api') - is_expected.to contain_class('nova::wsgi::apache_api') + is_expected.to contain_class('nova::cors') is_expected.to contain_class('nova::network::neutron') + is_expected.to contain_class('nova::wsgi::apache_api') } end diff --git a/spec/classes/tripleo_profile_base_nova_spec.rb b/spec/classes/tripleo_profile_base_nova_spec.rb index 75bdf3c0f..8ee04a102 100644 --- a/spec/classes/tripleo_profile_base_nova_spec.rb +++ b/spec/classes/tripleo_profile_base_nova_spec.rb @@ -30,7 +30,10 @@ describe 'tripleo::profile::base::nova' do is_expected.to contain_class('tripleo::profile::base::nova') is_expected.to_not contain_class('nova') is_expected.to_not contain_class('nova::config') + is_expected.to_not contain_class('nova::logging') is_expected.to_not contain_class('nova::cache') + is_expected.to_not contain_class('nova::placement') + is_expected.to_not contain_class('nova::keystone::service_user') } end @@ -49,11 +52,14 @@ describe 'tripleo::profile::base::nova' do :default_transport_url => 'rabbit://nova:foo@localhost:5672/?ssl=0' ) is_expected.to contain_class('nova::config') + is_expected.to contain_class('nova::logging') is_expected.to contain_class('nova::cache').with( :enabled => true, :backend => 'oslo_cache.memcache_pool', :memcache_servers => ['127.0.0.1:11211'] ) + is_expected.to contain_class('nova::placement') + is_expected.to contain_class('nova::keystone::service_user') } end @@ -69,7 +75,10 @@ describe 'tripleo::profile::base::nova' do is_expected.to contain_class('tripleo::profile::base::nova') is_expected.to_not contain_class('nova') is_expected.to_not contain_class('nova::config') + is_expected.to_not contain_class('nova::logging') is_expected.to_not contain_class('nova::cache') + is_expected.to_not contain_class('nova::placement') + is_expected.to_not contain_class('nova::keystone::service_user') } end @@ -90,7 +99,10 @@ describe 'tripleo::profile::base::nova' do :nova_private_key => nil, ) is_expected.to contain_class('nova::config') + is_expected.to contain_class('nova::logging') is_expected.to contain_class('nova::cache') + is_expected.to contain_class('nova::placement') + is_expected.to contain_class('nova::keystone::service_user') is_expected.to_not contain_class('nova::migration::libvirt') is_expected.to_not contain_file('/etc/nova/migration/authorized_keys') is_expected.to_not contain_file('/etc/nova/migration/identity')