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:
Lance Albertson 2019-06-14 15:58:26 -07:00
parent ef8d213673
commit d68cadb1a8
3 changed files with 23 additions and 10 deletions

View File

@ -19,8 +19,6 @@ depends 'openstack-compute', '>= 18.0.0'
depends 'openstack-block-storage', '>= 18.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)

View File

@ -83,20 +83,19 @@ connection_params = {
end
end
include_recipe 'openstack-common'
tempest_path = '/opt/tempest'
venv_path = '/opt/tempest-venv'
python_virtualenv venv_path do
pip_version '18.0'
setuptools_version '40.0.0'
wheel_version '0.31.1'
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
@ -104,7 +103,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

View File

@ -91,6 +91,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'
@ -101,6 +113,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',