summaryrefslogtreecommitdiffstats
path: root/tests/config.py
diff options
context:
space:
mode:
authordongwenjuan <dong.wenjuan@zte.com.cn>2017-06-22 19:26:05 +0800
committerdongwenjuan <dong.wenjuan@zte.com.cn>2017-06-30 17:13:24 +0800
commit6023c50ca1a02808703ffb5a3cb18375a1c5a8fa (patch)
tree9613f46486bce5466ebe24ffbbbb76279243e868 /tests/config.py
parent1bc6eb0e8f1ed1e20edcdd7362c23c8948ed3d77 (diff)
support config file
Change-Id: Ib8e696acfe21787904fce6838341f3a256aa0267 Signed-off-by: dongwenjuan <dong.wenjuan@zte.com.cn>
Diffstat (limited to 'tests/config.py')
-rw-r--r--tests/config.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/config.py b/tests/config.py
index 7a0bef2d..3cacd0a2 100644
--- a/tests/config.py
+++ b/tests/config.py
@@ -7,6 +7,7 @@
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
import itertools
+
from oslo_config import cfg
import image
@@ -23,7 +24,7 @@ def list_opts():
]
-def prepare_conf(conf=None):
+def prepare_conf(args=None, conf=None, config_files=None):
if conf is None:
conf = cfg.ConfigOpts()
@@ -31,4 +32,7 @@ def prepare_conf(conf=None):
conf.register_opts(list(options),
group=None if group == 'DEFAULT' else group)
+ conf(args, project='doctor', validate_default_values=True,
+ default_config_files=config_files)
+
return conf