From Fedora Project Wiki

Revision as of 18:49, 18 September 2012 by Nsantos (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Run Tempest test cases.


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
$> 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
$> cd tempest

Create tempest config:

$> cd etc
$> wget
$> wget
$> 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).