Changes for tempest tests
Create and use m1.nano flavor. Disable volume snapshots. Use local-net created in repo integration test runs. Remove python virtualenv package, it contains old setuptools for centos Change-Id: I42216a174930b17a4771e78c639da54e170a288c
This commit is contained in:
parent
5d016a774b
commit
5a86f23c2a
|
@ -25,6 +25,7 @@ default['openstack']['integration-test'] = {
|
|||
'tenant_reuse' => true,
|
||||
'alt_ssh_user' => 'cirros',
|
||||
'ssh_user' => 'cirros',
|
||||
'fixed_network' => 'local_net',
|
||||
'user1' => {
|
||||
'user_name' => 'tempest_user1',
|
||||
'password' => 'tempest_user1_pass',
|
||||
|
@ -38,13 +39,13 @@ default['openstack']['integration-test'] = {
|
|||
'image1' => {
|
||||
'name' => 'cirros',
|
||||
'id' => nil,
|
||||
'flavor' => 1,
|
||||
'flavor' => 99,
|
||||
'source' => 'http://download.cirros-cloud.net/0.3.2/cirros-0.3.2-x86_64-disk.img'
|
||||
},
|
||||
'image2' => {
|
||||
'name' => 'cirros',
|
||||
'id' => nil,
|
||||
'flavor' => 1,
|
||||
'flavor' => 99,
|
||||
'source' => 'http://download.cirros-cloud.net/0.3.2/cirros-0.3.2-x86_64-disk.img'
|
||||
}
|
||||
}
|
||||
|
@ -53,9 +54,9 @@ default['openstack']['integration-test'] = {
|
|||
case platform_family
|
||||
when 'fedora', 'rhel' # :pragma-foodcritic: ~FC024 - won't fix this
|
||||
default['openstack']['integration-test']['platform'] = {
|
||||
'tempest_packages' => %w(git python-virtualenv libxslt-devel
|
||||
'tempest_packages' => %w(git libxslt-devel
|
||||
libxml2-devel python-testrepository
|
||||
libffi-devel),
|
||||
libffi-devel python-setuptools),
|
||||
'package_overrides' => ''
|
||||
}
|
||||
when 'debian'
|
||||
|
|
|
@ -96,11 +96,11 @@ git '/opt/tempest' do
|
|||
action :sync
|
||||
end
|
||||
|
||||
admin_user = node['openstack']['identity']['admin_user']
|
||||
admin_tenant = node['openstack']['identity']['admin_tenant_name']
|
||||
|
||||
%w(image1 image2).each do |img|
|
||||
image_name = node['openstack']['integration-test'][img]['name']
|
||||
admin_user = node['openstack']['identity']['admin_user']
|
||||
admin_tenant = node['openstack']['identity']['admin_tenant_name']
|
||||
|
||||
openstack_image_image img do
|
||||
identity_user admin_user
|
||||
identity_pass admin_pass
|
||||
|
@ -126,6 +126,22 @@ end
|
|||
end
|
||||
end
|
||||
|
||||
# NOTE: This has to be done in a ruby_block so it gets executed at execution
|
||||
# time and not compile time (when nova does not yet exist).
|
||||
ruby_block 'Create nano flavor 99' do
|
||||
block do
|
||||
begin
|
||||
env = openstack_command_env(admin_user, admin_tenant)
|
||||
output = openstack_command('nova', 'flavor-list', env)
|
||||
unless output.include? 'm1.nano'
|
||||
openstack_command('nova', 'flavor-create m1.nano 99 64 0 1', env)
|
||||
end
|
||||
rescue RuntimeError => e
|
||||
Chef::Log.error("Could not create flavor m1.nano. Error was #{e.message}")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
template '/opt/tempest/etc/tempest.conf' do
|
||||
source 'tempest.conf.erb'
|
||||
owner 'root'
|
||||
|
@ -153,6 +169,7 @@ template '/opt/tempest/etc/tempest.conf' do
|
|||
'tempest_ssh_user' => node['openstack']['integration-test']['ssh_user'],
|
||||
'tempest_user2' => node['openstack']['integration-test']['user2']['user_name'],
|
||||
'tempest_user2_pass' => node['openstack']['integration-test']['user2']['password'],
|
||||
'tempest_user2_tenant' => node['openstack']['integration-test']['user2']['tenant_name']
|
||||
'tempest_user2_tenant' => node['openstack']['integration-test']['user2']['tenant_name'],
|
||||
'tempest_fixed_network' => node['openstack']['integration-test']['fixed_network']
|
||||
)
|
||||
end
|
||||
|
|
|
@ -12,7 +12,7 @@ describe 'openstack-integration-test::setup' do
|
|||
include_context 'tempest-stubs'
|
||||
|
||||
it 'installs tempest dependencies' do
|
||||
packages = %w(git python-virtualenv libxslt-devel libxml2-devel
|
||||
packages = %w(git libxslt-devel libxml2-devel
|
||||
python-testrepository libffi-devel)
|
||||
|
||||
packages.each do |pkg|
|
||||
|
|
|
@ -182,6 +182,10 @@ describe 'openstack-integration-test::setup' do
|
|||
expect(chef_run).to_not run_ruby_block("Get and set image2's ID")
|
||||
end
|
||||
|
||||
it 'runs ruby_block for nano flavor' do
|
||||
expect(chef_run).to run_ruby_block('Create nano flavor 99')
|
||||
end
|
||||
|
||||
describe 'tempest.conf' do
|
||||
let(:file) { chef_run.template('/opt/tempest/etc/tempest.conf') }
|
||||
|
||||
|
|
|
@ -36,6 +36,8 @@ image_ref_alt = <%= node['openstack']['integration-test']['image2']['id'] %>
|
|||
flavor_ref = <%= @tempest_img_flavor1 %>
|
||||
flavor_ref_alt = <%= @tempest_img_flavor2 %>
|
||||
|
||||
fixed_network_name = <%= @tempest_fixed_network %>
|
||||
|
||||
build_interval = 3
|
||||
|
||||
build_timeout = 400
|
||||
|
@ -120,6 +122,10 @@ build_interval = 3
|
|||
build_timeout = 400
|
||||
backup = false
|
||||
|
||||
[volume-feature-enabled]
|
||||
|
||||
snapshot = false
|
||||
|
||||
[object-storage]
|
||||
|
||||
catalog_type = object-store
|
||||
|
|
Loading…
Reference in New Issue