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
This commit is contained in:
Takashi Kajinami 2019-09-08 22:30:16 +09:00
parent 2189f6da4b
commit 953d77a327
2 changed files with 22 additions and 5 deletions

View File

@ -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

View File

@ -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')