One of the longer standing issues we've had in Tempest was the Tempest is a set of tests without it's own UI (we just us tox to call testr), and *need* a config file. The provides some interesting chicken and egg issues about when we get the config file. There is a long set of evolution here, but this kept causing issues as we refactored to cleaner ways to integrate with testr.
As of Friday we're taking a different approach, which will hopefully make everything much simpler. We've implemented a proxy class in front our oslo config object which lazy evaluates the config file the first time someone asks for an attribute. This lets us get the parsing entirely out of the class hierarchy of the tests. For tempest developers and reviewers, here are the things you should be looking for. 1) No one should call TempestConfig() themselves any more. The correct way to get the tempest config is: from tempest import config CONF = config.CONF .... inside some class ... if CONF.service_available.neutron: CONF is actually callable a lot more places now because of the evaluation order, which means we're going to be able to move a lot more of the skip logic into decorators. Yay! 2) Classes should stop having self.config or cls.config Because of the way setupClass was working, there was a ton of setting self.config / cls.config in class setup. We should stop that. The cleanups here are good low hanging fruit for new contributors. I'm sure there are optimizations to make our proxy object pattern better - https://github.com/openstack/tempest/blob/master/tempest/config.py#L738 comments welcomed there. However it has at least decoupled config from class hierarchy now, so will be easier to work on the problems separately instead of coupled. -Sean -- Sean Dague Samsung Research America s...@dague.net / sean.da...@samsung.com http://dague.net
signature.asc
Description: OpenPGP digital signature
_______________________________________________ OpenStack-dev mailing list OpenStack-dev@lists.openstack.org http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev