Ubuntu: install tempest plugin packages

Ubuntu provides tempest plugin packages in Universe.

Change-Id: Ie153aa0718e8dbd4103cefbade41520fa2441322
This commit is contained in:
Takashi Kajinami 2023-11-11 12:16:07 +09:00
parent e82af602ea
commit 8bce63c1d7
3 changed files with 66 additions and 70 deletions

View File

@ -52,7 +52,6 @@ class tempest::params {
'gcc', 'gcc',
'python3-virtualenv', 'python3-virtualenv',
] ]
if $facts['os']['name'] == 'Debian' {
$python_telemetry_tests = 'telemetry-tempest-plugin' $python_telemetry_tests = 'telemetry-tempest-plugin'
$python_cinder_tests = 'cinder-tempest-plugin' $python_cinder_tests = 'cinder-tempest-plugin'
$python_designate_tests = 'designate-tempest-plugin' $python_designate_tests = 'designate-tempest-plugin'
@ -65,40 +64,16 @@ class tempest::params {
$python_vitrage_tests = 'vitrage-tempest-plugin' $python_vitrage_tests = 'vitrage-tempest-plugin'
$python_murano_tests = 'murano-tempest-plugin' $python_murano_tests = 'murano-tempest-plugin'
$python_neutron_tests = 'neutron-tempest-plugin' $python_neutron_tests = 'neutron-tempest-plugin'
$python_l2gw_tests = false $python_l2gw_tests = undef
$python_sahara_tests = false $python_sahara_tests = undef
$python_trove_tests = 'trove-tempest-plugin' $python_trove_tests = 'trove-tempest-plugin'
$python_watcher_tests = 'watcher-tempest-plugin' $python_watcher_tests = 'watcher-tempest-plugin'
$python_zaqar_tests = 'zaqar-tempest-plugin' $python_zaqar_tests = 'zaqar-tempest-plugin'
$python_octavia_tests = 'octavia-tempest-plugin' $python_octavia_tests = 'octavia-tempest-plugin'
$python_ec2api_tests = false $python_ec2api_tests = undef
$python_barbican_tests = 'barbican-tempest-plugin' $python_barbican_tests = 'barbican-tempest-plugin'
$python_manila_tests = 'manila-tempest-plugin' $python_manila_tests = 'manila-tempest-plugin'
$package_name = 'tempest' $package_name = 'tempest'
}else{
$python_telemetry_tests = false
$python_cinder_tests = false
$python_designate_tests = false
$python_glance_tests = false
$python_heat_tests = false
$python_ironic_tests = false
$python_keystone_tests = false
$python_magnum_tests = false
$python_mistral_tests = false
$python_vitrage_tests = false
$python_murano_tests = false
$python_neutron_tests = false
$python_l2gw_tests = false
$python_sahara_tests = false
$python_trove_tests = false
$python_watcher_tests = false
$python_zaqar_tests = false
$python_octavia_tests = false
$python_ec2api_tests = false
$python_barbican_tests = false
$python_manila_tests = false
$package_name = 'tempest'
}
$pip_package_name = 'python3-pip' $pip_package_name = 'python3-pip'
} }
default: { default: {

View File

@ -0,0 +1,5 @@
---
features:
- |
The ``tempest`` class now installs tempest plugin packages such as
neutron-tempest-plugin according to the enabled services in Ubuntu.

View File

@ -538,9 +538,37 @@ describe 'tempest' do
context 'with when managing tests packages for keystone (required service)' do context 'with when managing tests packages for keystone (required service)' do
it "should install keystone tests package" do it "should install keystone tests package" do
is_expected.to contain_package('python-keystone-tests-tempest') is_expected.to contain_package('python-keystone-tests-tempest').with(
:name => platform_params[:python_keystone_tests]
)
end
it "should not install optional heat tests package" do
is_expected.to_not contain_package('python-heat-tests-tempest')
end
it "should not install optional sahara tests package" do
is_expected.to_not contain_package('python-sahara-tests-tempest') is_expected.to_not contain_package('python-sahara-tests-tempest')
end end
it "should install neutron but not *aas tests packages" do
is_expected.to contain_package('python-neutron-tests-tempest').with(
:name => platform_params[:python_neutron_tests]
)
is_expected.to_not contain_package('python-networking-l2gw-tests-tempest')
end
end
context 'with when managing tests packages for heat (optional service)' do
before :each do
params.merge!({ :heat_available => true })
end
it "should install heat tests package if available" do
is_expected.to contain_package('python-heat-tests-tempest').with(
:name => platform_params[:python_heat_tests]
)
end
end end
context 'with when managing tests packages for sahara (optional service)' do context 'with when managing tests packages for sahara (optional service)' do
@ -548,28 +576,16 @@ describe 'tempest' do
params.merge!({ :sahara_available => true }) params.merge!({ :sahara_available => true })
end end
it "should install sahara tests package" do it "should install sahara tests package if available" do
if platform_params[:python_sahara_tests] if platform_params[:python_sahara_tests]
is_expected.to contain_package('python-sahara-tests-tempest') is_expected.to contain_package('python-sahara-tests-tempest').with(
:name => platform_params[:python_sahara_tests]
)
else
is_expected.to_not contain_package('python-sahara-tests-tempest')
end end
end end
end end
context 'with when managing tests packages for neutron (optional service)' do
before :each do
params.merge!({
:neutron_available => true,
:public_network_id => '4c423fc6-87f7-4e6d-9d3c-abc13058ae5b'
})
end
it "should install neutron and *aas tests packages" do
if platform_params[:python_neutron_tests]
is_expected.to contain_package('python-neutron-tests-tempest')
end
is_expected.to_not contain_package('python-networking-l2gw-tests-tempest')
end
end
end end
on_supported_os({ on_supported_os({
@ -593,6 +609,7 @@ describe 'tempest' do
:package_name => 'tempest', :package_name => 'tempest',
:pip_command => 'pip3', :pip_command => 'pip3',
:pip_package_name => 'python3-pip', :pip_package_name => 'python3-pip',
:python_heat_tests => 'heat-tempest-plugin',
:python_keystone_tests => 'keystone-tempest-plugin', :python_keystone_tests => 'keystone-tempest-plugin',
:python_neutron_tests => 'neutron-tempest-plugin', :python_neutron_tests => 'neutron-tempest-plugin',
:python_sahara_tests => false } :python_sahara_tests => false }
@ -607,6 +624,7 @@ describe 'tempest' do
:package_name => 'openstack-tempest', :package_name => 'openstack-tempest',
:pip_command => 'pip3', :pip_command => 'pip3',
:pip_package_name => 'python3-pip', :pip_package_name => 'python3-pip',
:python_heat_tests => 'python3-heat-tests-tempest',
:python_keystone_tests => 'python3-keystone-tests-tempest', :python_keystone_tests => 'python3-keystone-tests-tempest',
:python_neutron_tests => 'python3-neutron-tests-tempest', :python_neutron_tests => 'python3-neutron-tests-tempest',
:python_sahara_tests => 'python3-sahara-tests-tempest' } :python_sahara_tests => 'python3-sahara-tests-tempest' }
@ -614,9 +632,7 @@ describe 'tempest' do
end end
it_behaves_like 'tempest' it_behaves_like 'tempest'
if facts[:os]['name'] != 'Ubuntu'
it_behaves_like 'tempest with plugins packages' it_behaves_like 'tempest with plugins packages'
end end
end end
end end
end