From 73febf900b85dae4d953389696f3a78cf8267816 Mon Sep 17 00:00:00 2001 From: Panagiotis Karalis Date: Thu, 11 Apr 2019 13:28:21 +0300 Subject: Failed to upload results to ONAP portal The results.json file generated by running 'dovetail run --testsuite xxx' is different from the one generated by running 'dovetail run --testcase xxx'. The former can be uploaded to ONAP portal successfully but the latter one can't. The main reason is that the latter one lacking of 'vnf_type'. Keep the results.json with the same format for both running one test suite or several test cases. JIRA: DOVETAIL-769 Change-Id: I46af84f9f229f9e601439f68c9ed9df9477d002b Signed-off-by: Panagiotis Karalis --- dovetail/report.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'dovetail/report.py') diff --git a/dovetail/report.py b/dovetail/report.py index 36a33a49..06ef4159 100644 --- a/dovetail/report.py +++ b/dovetail/report.py @@ -122,6 +122,13 @@ class Report(object): testcase_inreport['result'] = testcase.passed() testcase_inreport['objective'] = testcase.objective() + try: + vnf_type = testcase.vnf_type() + except Exception: + vnf_type = None + if vnf_type: + report_obj['vnf_type'] = vnf_type + report_obj['vnf_checksum'] = self.get_checksum(vnf_type) testcase_inreport['mandatory'] = testcase.is_mandatory testcase_inreport['sub_testcase'] = [] if testcase.sub_testcase() is not None: -- cgit 1.2.3-korg