[openstack-dev] [qa] Use test scenarios for interface type and auth version

Frittoli, Andrea (Cloud Services) frittoli at hp.com
Fri Jan 3 15:14:25 UTC 2014


Hi,

 

I'm working on multi-keystone-api-version-tests which aims to provide the
ability to run tests using a configurable list of keystone API versions for
authentication.

 

If two versions of the API are configured, each test would be run using the
two versions.  

In the gate, where we're short of time, we could test only the latest stable
version, but in other tests will have the ability to use more than one
version.

 

The approach I'm considering is based on testscenarios. 

Thinking about how to implement this I recognized that a solution that works
for auth version could be used also to run json / xml, removing the need to
have two classes for API test.

 

The idea I have is to change Base[Service]Test classes and move the client
selection logic to BaseTestCase.  Something like this:

 

                def __getattr__(self, attr):

                                if attr in
manager.list_of_available_clients:

                                    manager.get_client(attr,
self.auth_version, self.interface)

                          else:

                                 raise AttributeError

Where both auth_version and interface can be injected by testscenarios and
be different for different test instances.

The manager in clients.py could be condensed a bit, using __getattr__ and a
list_of_available_clients, mapped to the corresponding service class.

 

Several tests create a self.client = self.my_favourite_client, which I would
need to remove.

 

As it would be a relatively substantial change, I wanted to get some input /
opinion before I started implementing it.

 

Thanks!

 

andrea

 

 

-- 

Andrea Frittoli

IaaS Systems Engineering Team

HP Cloud Services

Tel: +44(0)11731 62324

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20140103/38f3998a/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 6199 bytes
Desc: not available
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20140103/38f3998a/attachment.bin>


More information about the OpenStack-dev mailing list