Fix logic for config file env variables
This commit fixes the logic around the 2 env variables to set the
location of the tempest config file. Previously the check to see
whether the config variables should be used instead of the default
path would be too selective and the default path etc/tempest.conf
would be used. The only check needed is whether the specified file
exists or not. The presence of the env variables shouldn't affect
that logic.
Change-Id: Id6be0f067673d600bf04dea700e69c2baffb9d9f
diff --git a/tempest/config.py b/tempest/config.py
index 3c7241a..9ab9a09 100644
--- a/tempest/config.py
+++ b/tempest/config.py
@@ -715,9 +715,7 @@
path = os.path.join(conf_dir, conf_file)
- if not (os.path.isfile(path) or
- 'TEMPEST_CONFIG_DIR' in os.environ or
- 'TEMPEST_CONFIG' in os.environ):
+ if not os.path.isfile(path):
path = failsafe_path
# only parse the config file if we expect one to exist. This is needed