diff --git a/functionaltests/engine/base.py b/functionaltests/engine/base.py index 18b3c081..dd3bb689 100644 --- a/functionaltests/engine/base.py +++ b/functionaltests/engine/base.py @@ -117,6 +117,8 @@ class MuranoBase(testtools.TestCase, testtools.testcase.WithAttributes, def setUpClass(cls): super(MuranoBase, cls).setUpClass() + cfg.load_config() + cls.client = Client(user=CONF.murano.user, password=CONF.murano.password, tenant=CONF.murano.tenant, diff --git a/functionaltests/engine/config.py b/functionaltests/engine/config.py index e6cd1796..975408a5 100644 --- a/functionaltests/engine/config.py +++ b/functionaltests/engine/config.py @@ -49,12 +49,13 @@ def register_config(config, config_group, config_opts): config.register_group(config_group) config.register_opts(config_opts, config_group) -__location = os.path.realpath(os.path.join(os.getcwd(), - os.path.dirname(__file__))) -path = os.path.join(__location, "config.conf") +def load_config(): + __location = os.path.realpath(os.path.join(os.getcwd(), + os.path.dirname(__file__))) + path = os.path.join(__location, "config.conf") -if os.path.exists(path): - cfg.CONF([], project='muranointegration', default_config_files=[path]) + if os.path.exists(path): + cfg.CONF([], project='muranointegration', default_config_files=[path]) -register_config(cfg.CONF, murano_group, MuranoGroup) + register_config(cfg.CONF, murano_group, MuranoGroup)