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:53 UTC
[15/50] trafficserver-qa git commit: Cleanup of cfg_dir and add
"proxies" attribute
Cleanup of cfg_dir and add "proxies" attribute
Project: http://git-wip-us.apache.org/repos/asf/trafficserver-qa/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver-qa/commit/82b0fd2d
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver-qa/tree/82b0fd2d
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver-qa/diff/82b0fd2d
Branch: refs/heads/master
Commit: 82b0fd2ddd9f3808fee578545b85c16bde11603d
Parents: 03de0c4
Author: Thomas Jackson <ja...@gmail.com>
Authored: Tue Dec 23 14:22:15 2014 -0800
Committer: Thomas Jackson <ja...@gmail.com>
Committed: Tue Dec 23 14:22:15 2014 -0800
----------------------------------------------------------------------
tsqa/test_cases.py | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver-qa/blob/82b0fd2d/tsqa/test_cases.py
----------------------------------------------------------------------
diff --git a/tsqa/test_cases.py b/tsqa/test_cases.py
index 88e6e60..6100c9e 100644
--- a/tsqa/test_cases.py
+++ b/tsqa/test_cases.py
@@ -28,7 +28,7 @@ class EnvironmentCase(unittest.TestCase):
# 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'))
+ 'records.config': tsqa.configs.RecordsConfig(os.path.join(cls.environment.layout.sysconfdir, 'records.config'))
}
# call env setup, so people can change configs etc
@@ -67,6 +67,14 @@ class EnvironmentCase(unittest.TestCase):
super(EnvironmentCase, cls).tearDownClass()
cls.environment.destroy() # this will tear down any processes that we started
+ # Some helpful properties
+ @property
+ def proxies(self):
+ '''
+ Return a dict of schema -> proxy. This is primarily used for requests
+ '''
+ # TODO: create a better dict by parsing the config-- to handle http/https ports in the string
+ return {'http': 'http://127.0.0.1:{0}'.format(self.configs['records.config']['CONFIG']['proxy.config.http.server_ports'])}
class DynamicHTTPEndpointCase(unittest.TestCase):
'''