[Openstack] Cleaning after tests

Sławek Kapłoński slawek at kaplonski.pl
Thu Nov 7 19:01:09 UTC 2013


Hello,

I'm trying to use tempest tests to testing openstack installation. I'm using 
branch stable/grizzly and I can't now upgrade it to havana. My problem is that 
if some test has got error e.g. test instance is not created propery than in 
openstack database remains a lot of unecessary instances, tenants, user and 
other data.
I try to fix some tests to catch errors in few places and clean after such 
errors but there are place that I have no idea how to clean. E.g. in test:

test_server_security_groups(self)
from tempest/tests/compute/security_groups/test_security_groups.py

if in code:
	# Create server and add the security group created
        # above to the server we just created
        server_name = rand_name('server')
        resp, server = self.servers_client.create_server(server_name,
                                                         self.image_ref,
                                                         self.flavor_ref)
        server_id = server['id']
        self.servers_client.wait_for_server_status(server_id, 'ACTIVE')

is not created properly than this instance is in database with state "ERROR" 
and it is not deleted. Also tenant and user which was earlier created in test 
class are not deleted.
So maybe someone of You have got such problem and know how to clean database 
after tempest tests?

-----------------------
Regards,
Sławek Kapłoński
slawek at kaplonski.pl




More information about the Openstack mailing list