"scenario": os.environ.get('DEPLOY_SCENARIO', 'unknown')
}
results['details'] = {"test_results": details_doc}
-
- target = "http://testresults.opnfv.org/test/api/v1/results"
+ target = os.environ.get(
+ '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,
def docker_env_prepare(config):
+ LOG.info("Begin to prepare docker environment")
if 'contexts' in config.keys() and config["contexts"] is not None:
context_config = config["contexts"]
if 'yardstick' in context_config.keys() and \
conf_parser.Parser.convert_docker_env(config, "dashboard")
LOG.debug('Waiting for ELK init')
time.sleep(15)
+ LOG.info("Docker environment have prepared")
return
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:
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():