QA:Testcase run Tempest tests

From FedoraProject

(Difference between revisions)
Jump to: navigation, search
 
(One intermediate revision by one user not shown)
Line 4: Line 4:
  
 
Ensure nova is configured to allow resizing of instances on a single host:
 
Ensure nova is configured to allow resizing of instances on a single host:
  $> sudo openstack-config-set /etc/nova/nova.conf DEFAULT allow_resize_to_same_host True
+
  $> sudo openstack-config --set /etc/nova/nova.conf DEFAULT allow_resize_to_same_host True
 
  $> for svc in api compute scheduler; do sudo systemctl restart openstack-nova-$svc.service; done
 
  $> for svc in api compute scheduler; do sudo systemctl restart openstack-nova-$svc.service; done
  
Line 48: Line 48:
  
 
[[Category:OpenStack Test Cases]]
 
[[Category:OpenStack Test Cases]]
[[Category:Cloud SIG]]
 

Latest revision as of 18:49, 18 September 2012

Contents

Description

Run Tempest test cases.

Setup

Assumes keystone, nova and glance are already configured and running.

Ensure nova is configured to allow resizing of instances on a single host:

$> sudo openstack-config --set /etc/nova/nova.conf DEFAULT allow_resize_to_same_host True
$> for svc in api compute scheduler; do sudo systemctl restart openstack-nova-$svc.service; done

Install test dependencies:

$> sudo yum install -y python-nose python-unittest2

Create a temporary directory to work from:

$> mkdir /tmp/tempest
$> cd /tmp/tempest

Upload some test images:

$> wget http://launchpad.net/cirros/trunk/0.3.0/+download/cirros-0.3.0-x86_64-uec.tar.gz
$> tar xvzf cirros-0.3.0-x86_64-uec.tar.gz
$> glance add name=cirros-0.3.0-x86_64-kernel is_public=true container_format=aki disk_format=aki < cirros-0.3.0-x86_64-vmlinuz
$> glance add name=cirros-0.3.0-x86_64-ramdisk is_public=true container_format=ari disk_format=ari < cirros-0.3.0-x86_64-initrd
$> glance add name=cirros-0.3.0-x86_64 is_public=true container_format=ami disk_format=ami \
                "kernel_id=$(glance index | awk '/cirros-0.3.0-x86_64-kernel/ {print $1}')" \
                "ramdisk_id=$(glance index | awk '/cirros-0.3.0-x86_64-ramdisk/ {print $1}')" \
                     < <(zcat --force cirros-0.3.0-x86_64-blank.img)

Clone the Tempest repo:

$> git clone https://github.com/openstack/tempest.git
$> cd tempest

Create tempest config:

$> cd etc
$> wget https://s3.amazonaws.com/openstack-tempest/config.ini
$> wget https://s3.amazonaws.com/openstack-tempest/tempest.conf
$> sed -i "s/%IMAGE_ID%/$(glance index | awk '/cirros-0.3.0-x86_64[^-]/ {print $1}')/" tempest.conf
$> cd .. 

How to test

Run Tempest tests with nose:

$> nosetests tempest

Expected Results

The time taken to run the testsuite is quite variable, and ranges from ~20 minutes on an EC2 large instance to circa twice that on a VM with 2Gb RAM and 2 CPUs running on a moderately powered laptop.

The majority of the tests should pass, though you may hit some failures due to timeout or resource starvation (for example breaching the floating IPs quota).