Drop poise-python in favor of directly installing python packages
The poise-python cookbook is no longer maintained by the upstream maintainer and is causing lots of issues for the testing pipeline. Instead, install tempest directly using pip via an execute resource. Change-Id: I6991581056d6037eb269a6753b1af7e5c2ba7d90 Signed-off-by: Lance Albertson <lance@osuosl.org>
This commit is contained in:
parent
856b1d34d7
commit
6ad56fc95e
|
@ -19,8 +19,6 @@ depends 'openstack-compute', '>= 17.0.0'
|
|||
depends 'openstack-block-storage', '>= 17.0.0'
|
||||
depends 'openstackclient'
|
||||
|
||||
depends 'poise-python'
|
||||
|
||||
issues_url 'https://launchpad.net/openstack-chef' if respond_to?(:issues_url)
|
||||
source_url 'https://github.com/openstack/cookbook-openstack-integration-test' if respond_to?(:source_url)
|
||||
chef_version '>= 12.5' if respond_to?(:chef_version)
|
||||
|
|
|
@ -78,18 +78,19 @@ connection_params = {
|
|||
end
|
||||
end
|
||||
|
||||
include_recipe 'openstack-common'
|
||||
|
||||
tempest_path = '/opt/tempest'
|
||||
venv_path = '/opt/tempest-venv'
|
||||
|
||||
python_virtualenv venv_path do
|
||||
system_site_packages true
|
||||
execute "virtualenv #{venv_path}" do
|
||||
creates venv_path
|
||||
end
|
||||
|
||||
python_execute 'install tempest' do
|
||||
execute 'install tempest' do
|
||||
action :nothing
|
||||
command '-m pip install .'
|
||||
command "#{venv_path}/bin/pip install ."
|
||||
cwd tempest_path
|
||||
virtualenv venv_path
|
||||
end
|
||||
|
||||
git tempest_path do
|
||||
|
@ -97,7 +98,7 @@ git tempest_path do
|
|||
reference '17.2.0'
|
||||
depth 1
|
||||
action :sync
|
||||
notifies :run, 'python_execute[install tempest]', :immediately
|
||||
notifies :run, 'execute[install tempest]', :immediately
|
||||
end
|
||||
|
||||
template "#{venv_path}/tempest.sh" do
|
||||
|
|
|
@ -90,6 +90,18 @@ describe 'openstack-integration-test::setup' do
|
|||
)
|
||||
end
|
||||
|
||||
it do
|
||||
expect(chef_run).to run_execute('virtualenv /opt/tempest-venv').with(creates: '/opt/tempest-venv')
|
||||
end
|
||||
|
||||
it do
|
||||
expect(chef_run).to nothing_execute('install tempest')
|
||||
.with(
|
||||
command: '/opt/tempest-venv/bin/pip install .',
|
||||
cwd: '/opt/tempest'
|
||||
)
|
||||
end
|
||||
|
||||
it 'syncs /opt/tempest from github' do
|
||||
expect(chef_run).to sync_git(
|
||||
'/opt/tempest'
|
||||
|
@ -100,6 +112,10 @@ describe 'openstack-integration-test::setup' do
|
|||
)
|
||||
end
|
||||
|
||||
it do
|
||||
expect(chef_run.git('/opt/tempest')).to notify('execute[install tempest]').to(:run).immediately
|
||||
end
|
||||
|
||||
it 'uploads image1' do
|
||||
expect(chef_run).to upload_openstack_image_image('image1').with(
|
||||
identity_user: 'admin',
|
||||
|
|
Loading…
Reference in New Issue