aboutsummaryrefslogtreecommitdiffstats
path: root/src/onaptests/steps/base.py
diff options
context:
space:
mode:
authorLukasz Rajewski <lukasz.rajewski@t-mobile.pl>2023-06-06 12:20:00 +0000
committerLukasz Rajewski <lukasz.rajewski@t-mobile.pl>2023-06-06 12:32:30 +0000
commitc458ace517bb640de7ec05cd2a26e33cfcac21e2 (patch)
treefa33046b361bd69280b52d3ed180db4c22f3de3d /src/onaptests/steps/base.py
parent74fa2a41627e8f2e807bb1c80d928dec3ccf8d85 (diff)
Add component name to the JSON report format
Issue-ID: INT-2235 Signed-off-by: Lukasz Rajewski <lukasz.rajewski@t-mobile.pl> Change-Id: I81274e0cca45ef86490e8004c594d7e85bf3c539
Diffstat (limited to 'src/onaptests/steps/base.py')
-rw-r--r--src/onaptests/steps/base.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/onaptests/steps/base.py b/src/onaptests/steps/base.py
index 0715545..8ebe247 100644
--- a/src/onaptests/steps/base.py
+++ b/src/onaptests/steps/base.py
@@ -193,7 +193,8 @@ class BaseStep(ABC):
self._cleanup_report = Report(
step_description=f"[{self.component}] {self.name} cleanup: {self.description}",
step_execution_status=execution_status,
- step_execution_duration=time.time() - self._start_cleanup_time
+ step_execution_duration=time.time() - self._start_cleanup_time,
+ step_component=self.component
)
else:
self._logger.info("*****************************************************")
@@ -207,7 +208,8 @@ class BaseStep(ABC):
self._execution_report = Report(
step_description=f"[{self.component}] {self.name}: {self.description}",
step_execution_status=execution_status if execution_status else ReportStepStatus.FAIL,
- step_execution_duration=time.time() - self._start_execution_time
+ step_execution_duration=time.time() - self._start_execution_time,
+ step_component=self.component
)
return wrapper