You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by jp...@apache.org on 2015/01/28 05:36:50 UTC
[12/50] trafficserver-qa git commit: Add records_config property
(might not keep)
Add records_config property (might not keep)
Project: http://git-wip-us.apache.org/repos/asf/trafficserver-qa/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver-qa/commit/50bd9ff9
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver-qa/tree/50bd9ff9
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver-qa/diff/50bd9ff9
Branch: refs/heads/master
Commit: 50bd9ff907623cc85a95722bd2f1c2aa7cf80622
Parents: ccda9f0
Author: Thomas Jackson <ja...@gmail.com>
Authored: Tue Dec 23 13:54:01 2014 -0800
Committer: Thomas Jackson <ja...@gmail.com>
Committed: Tue Dec 23 13:54:01 2014 -0800
----------------------------------------------------------------------
tsqa/test_cases.py | 10 ++++++++++
1 file changed, 10 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver-qa/blob/50bd9ff9/tsqa/test_cases.py
----------------------------------------------------------------------
diff --git a/tsqa/test_cases.py b/tsqa/test_cases.py
index 419d82c..a6a5820 100644
--- a/tsqa/test_cases.py
+++ b/tsqa/test_cases.py
@@ -4,6 +4,7 @@ Some base test cases that do environment handling for you
import tsqa.endpoint
import tsqa.environment
+import tsqa.configs
import tsqa.utils
unittest = tsqa.utils.import_unittest()
@@ -29,6 +30,15 @@ class EnvironmentCase(unittest.TestCase):
# start ATS
cls.environment.start()
+ 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):
'''