Clean up interface to configs
Project: http://git-wip-us.apache.org/repos/asf/trafficserver-qa/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver-qa/commit/03de0c42 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver-qa/tree/03de0c42 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver-qa/diff/03de0c42 Branch: refs/heads/master Commit: 03de0c423b6d754748845f05e4980bd93c2324fb Parents: fcbbd78 Author: Thomas Jackson <[email protected]> Authored: Tue Dec 23 13:57:20 2014 -0800 Committer: Thomas Jackson <[email protected]> Committed: Tue Dec 23 13:57:20 2014 -0800 ---------------------------------------------------------------------- tsqa/test_cases.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver-qa/blob/03de0c42/tsqa/test_cases.py ---------------------------------------------------------------------- diff --git a/tsqa/test_cases.py b/tsqa/test_cases.py index a6a5820..88e6e60 100644 --- a/tsqa/test_cases.py +++ b/tsqa/test_cases.py @@ -24,6 +24,13 @@ class EnvironmentCase(unittest.TestCase): # get an environment cls.environment = cls.getEnv() + cfg_dir = os.path.join(cls.environment.layout.prefix, 'etc', 'trafficserver') + + # create a bunch of config objects that people can access/modify + cls.configs = { + 'records.config': tsqa.configs.RecordsConfig(os.path.join(cfg_dir, 'records.config')) + } + # call env setup, so people can change configs etc cls.setUpEnv(cls.environment) @@ -32,13 +39,6 @@ class EnvironmentCase(unittest.TestCase): cls._config_cache = {} - @property - def records_config(self): - if 'records.config' not in self._config_cache: - cfg_dir = os.path.join(self.environment.layout.prefix, 'etc', 'trafficserver') - self._config_cache['records.config'] = tsqa.configs.RecordsConfig(os.path.join(cfg_dir, 'records.config')) - return self._config_cache['records.config'] - @classmethod def getEnv(cls): '''
