diff options
author | Michal Jagiello <michal.jagiello@t-mobile.pl> | 2021-10-21 10:49:07 +0000 |
---|---|---|
committer | Michal Jagiello <michal.jagiello@t-mobile.pl> | 2021-11-08 17:29:49 +0000 |
commit | 46d3e9b16ae611246d73afaabcb4fa236fc19846 (patch) | |
tree | 869f503accd09ebd8acd373252f4511ca8089571 | |
parent | 17fd4b701a3ba21b656719a5991190d02eb51dc2 (diff) |
[TEST] Do not show "No execution start time..." error log message for skipped substeps
If one of the step fails and there are more substeps in the scenario then they won't be executed.
During the report creation in the code the status of these steps were not checked and the confusing
error message was logged.
That change provide additional check if the step was skipped (not executed).
Issue-ID: TEST-368
Signed-off-by: Michal Jagiello <michal.jagiello@t-mobile.pl>
Change-Id: Id1ea95229b2fd5cf3107d423f356f02dab437669
(cherry picked from commit ac0b4732cf23d5bf9c96ef56e8d6e5346f3c2fbc)
-rw-r--r-- | src/onaptests/steps/base.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/onaptests/steps/base.py b/src/onaptests/steps/base.py index 4d6858d..97c9159 100644 --- a/src/onaptests/steps/base.py +++ b/src/onaptests/steps/base.py @@ -187,8 +187,9 @@ class BaseStep(ABC): ) else: if not self._start_execution_time: - self._logger.error("No execution start time saved for %s step. Fix it by call `super.execute()` " - "in step class `execute()` method definition", self.name) + if execution_status != ReportStepStatus.NOT_EXECUTED: + self._logger.error("No execution start time saved for %s step. Fix it by call `super.execute()` " + "in step class `execute()` method definition", self.name) self._start_execution_time = time.time() self._execution_report = Report( step_description=f"[{self.component}] {self.name}: {self.description}", |