Fix setup of tempest virtualenv
- Untangle venv dir and git repo - Install tempest into venv properly - Install wrapper script to run tempest from venv - Use latest stable cirros image Change-Id: If64fd079a8955d417daa76d431959f0335280467
This commit is contained in:
parent
3beb5bb990
commit
76d7e264ee
|
@ -44,13 +44,13 @@ default['openstack']['integration-test'] = {
|
|||
'name' => 'cirros-test1',
|
||||
'id' => '1ac790f6-903a-4833-979f-a38f1819e3b1',
|
||||
'flavor' => 99,
|
||||
'source' => 'http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img'
|
||||
'source' => 'http://download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-disk.img'
|
||||
},
|
||||
'image2' => {
|
||||
'name' => 'cirros-test2',
|
||||
'id' => 'f7c2ac6d-0011-499f-a9ec-ca71348bf2e4',
|
||||
'flavor' => 99,
|
||||
'source' => 'http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img'
|
||||
'source' => 'http://download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-disk.img'
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -61,15 +61,13 @@ when 'fedora', 'rhel' # :pragma-foodcritic: ~FC024 - won't fix this
|
|||
tempest_packages: %w(git libxslt-devel
|
||||
libxml2-devel python-testrepository
|
||||
libffi-devel python-setuptools),
|
||||
package_overrides: '',
|
||||
python_packages: []
|
||||
package_overrides: ''
|
||||
}
|
||||
when 'debian'
|
||||
default['openstack']['integration-test']['platform'] = {
|
||||
tempest_packages: %w( git libssl-dev libffi-dev python-dev libxml2-dev
|
||||
libxslt1-dev libpq-dev libxml2-dev libxslt-dev
|
||||
testrepository python-dev libffi-dev),
|
||||
package_overrides: "-o Dpkg::Options::='--force-confold' -o Dpkg::Options::='--force-confdef'",
|
||||
python_packages: %w(oslotest ddt testscenarios)
|
||||
tempest_packages: %w(git libssl-dev libffi-dev python-dev libxml2-dev
|
||||
libxslt1-dev libpq-dev libxml2-dev libxslt-dev
|
||||
testrepository python-dev libffi-dev),
|
||||
package_overrides: "-o Dpkg::Options::='--force-confold' -o Dpkg::Options::='--force-confdef'"
|
||||
}
|
||||
end
|
||||
|
|
|
@ -101,15 +101,19 @@ openstack_role heat_stack_user_role do
|
|||
connection_params connection_params
|
||||
end
|
||||
|
||||
venv_path = '/opt/tempest'
|
||||
tempest_path = '/opt/tempest'
|
||||
venv_path = '/opt/tempest-venv'
|
||||
|
||||
python_virtualenv venv_path
|
||||
|
||||
python_execute 'install tempest' do
|
||||
action :nothing
|
||||
command '-m pip install .'
|
||||
cwd venv_path
|
||||
cwd tempest_path
|
||||
virtualenv venv_path
|
||||
end
|
||||
|
||||
git venv_path do
|
||||
git tempest_path do
|
||||
repository 'https://github.com/openstack/tempest'
|
||||
reference 'master'
|
||||
depth 1
|
||||
|
@ -117,13 +121,14 @@ git venv_path do
|
|||
notifies :run, 'python_execute[install tempest]', :immediately
|
||||
end
|
||||
|
||||
python_virtualenv venv_path
|
||||
|
||||
platform_options['python_packages'].each do |pkg|
|
||||
python_package pkg do
|
||||
virtualenv venv_path
|
||||
action :upgrade
|
||||
end
|
||||
template "#{venv_path}/tempest.sh" do
|
||||
source 'tempest.sh.erb'
|
||||
user 'root'
|
||||
group 'root'
|
||||
mode 0755
|
||||
variables(
|
||||
venv_path: venv_path
|
||||
)
|
||||
end
|
||||
|
||||
%w(image1 image2).each do |img|
|
||||
|
|
|
@ -144,7 +144,7 @@ describe 'openstack-integration-test::setup' do
|
|||
identity_project_domain_name: 'default',
|
||||
image_name: 'cirros-test1',
|
||||
image_id: '1ac790f6-903a-4833-979f-a38f1819e3b1',
|
||||
image_url: 'http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img'
|
||||
image_url: 'http://download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-disk.img'
|
||||
)
|
||||
end
|
||||
|
||||
|
@ -158,7 +158,7 @@ describe 'openstack-integration-test::setup' do
|
|||
identity_project_domain_name: 'default',
|
||||
image_name: 'cirros-test2',
|
||||
image_id: 'f7c2ac6d-0011-499f-a9ec-ca71348bf2e4',
|
||||
image_url: 'http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img'
|
||||
image_url: 'http://download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-disk.img'
|
||||
)
|
||||
end
|
||||
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
source <%= @venv_path -%>/bin/activate
|
||||
tempest run --smoke --serial
|
Loading…
Reference in New Issue