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
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ OpenStack-dev mailing list OpenStack-dev@lists.openstack.org http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev