diff options
author | Yang Yu <Gabriel.yuyang@huawei.com> | 2017-08-02 16:32:02 +0800 |
---|---|---|
committer | Yang Yu <Gabriel.yuyang@huawei.com> | 2017-08-02 23:46:07 +0800 |
commit | b20de06b02a6eec449e5ac1e99226f35728b248d (patch) | |
tree | 8a03251d5245929569776e1c7b63cdd611a8a98e | |
parent | fd66a0466e931e28ebd1f0925e9c9a0c28912a02 (diff) |
Change path to reporting db
JIRA: BOTTLENECK-158
Change the path env to align with CI pipeline
Change-Id: Ib5a7799c3eb3e5ba9056aa738c4c3b15995e3c11
Signed-off-by: Yang Yu <Gabriel.yuyang@huawei.com>
-rw-r--r-- | testsuites/run_testsuite.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/testsuites/run_testsuite.py b/testsuites/run_testsuite.py index bc255c46..8c8f6996 100644 --- a/testsuites/run_testsuite.py +++ b/testsuites/run_testsuite.py @@ -60,12 +60,11 @@ def report(testcase, start_date, stop_date, criteria, details_doc): "scenario": os.environ.get('DEPLOY_SCENARIO', 'unknown') } results['details'] = {"test_results": details_doc} - target = os.environ.get( - 'REPORTING_DB', + 'BOTTLENECKS_DB_TARGET', 'http://testresults.opnfv.org/test/api/v1/results') + print ('Address of the target DB is: %s.' % target) timeout = 5 - try: LOG.debug('Test result : %s', jsonutils.dump_as_bytes(results)) res = requests.post(target, @@ -113,6 +112,7 @@ def testsuite_run(test_level, test_name, REPORT="False"): LOG.info("End of %s testcase in POSCA testsuite", testcase) criteria = "FAIL" if REPORT == "True": + print ('Testing results are about to be sent to the target DB.') details_doc = [] if os.path.exists(config[testcase]['out_file']): with open(config[testcase]['out_file']) as details_result: @@ -120,6 +120,8 @@ def testsuite_run(test_level, test_name, REPORT="False"): if len(details_doc): criteria = "PASS" report(testcase, start_date, stop_date, criteria, details_doc) + else: + print ('Testing results have not been sent to the target DB.') def main(): |