diff options
Diffstat (limited to 'functest/utils')
-rw-r--r-- | functest/utils/functest_utils.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/functest/utils/functest_utils.py b/functest/utils/functest_utils.py index dbed811a..e5e755d7 100644 --- a/functest/utils/functest_utils.py +++ b/functest/utils/functest_utils.py @@ -151,7 +151,15 @@ def get_db_url(): """ Returns DB URL """ - return get_functest_config('results.test_db_url') + # TODO use CONST mechanism + try: + # if TEST_DB_URL declared in env variable, use it! + db_url = os.environ['TEST_DB_URL'] + except KeyError: + logger.info("DB URL not declared as env variable," + "use local configuration") + db_url = get_functest_config('results.test_db_url') + return db_url def logger_test_results(project, case_name, status, details): |