Fix DEFAULT_CONFIG_DIR
The current DEFAULT_CONFIG_DIR makes no sense
when installing tempest as a python package as it is
derived from the absolute path of config.py which is
incorrect.
For example:
/usr/lib/python2.7/site-packages/tempest/etc/
Is wrong.
Instead, it should be set to the relative path from
where the command is being executed.
For example, if tempest init ~/my_tempest were run,
the correct default config directory would be:
/home/me/my_tempest/etc
for the “my_tempest” initialized runtime.
Change-Id: I57d62107182ce652bbfb3c077b8a2311393234ed
diff --git a/tempest/config.py b/tempest/config.py
index b2bc931..8f9edb2 100644
--- a/tempest/config.py
+++ b/tempest/config.py
@@ -1306,9 +1306,7 @@
class TempestConfigPrivate(object):
"""Provides OpenStack configuration information."""
- DEFAULT_CONFIG_DIR = os.path.join(
- os.path.abspath(os.path.dirname(os.path.dirname(__file__))),
- "etc")
+ DEFAULT_CONFIG_DIR = os.path.join(os.getcwd(), "etc")
DEFAULT_CONFIG_FILE = "tempest.conf"