aboutsummaryrefslogtreecommitdiffstats
path: root/src/onaptests/steps
diff options
context:
space:
mode:
authorMichal Jagiello <michal.jagiello@t-mobile.pl>2022-04-07 07:26:58 +0000
committerMichal Jagiello <michal.jagiello@t-mobile.pl>2022-04-12 09:37:39 +0000
commit81584955687e053d0697a63131b026fa0eda47c7 (patch)
treefac92faedda8016eeef7b5112e0a193a73dad51d /src/onaptests/steps
parent4d1467f9290af4d64d329bc103893eaadd00e02c (diff)
Log exception stack trace on test failure
If test fails and exception is raised most of the test scenarios don't print a stack trace so debugging consume more time. Additionally double check on the SDC service distribution status due to an error on Python ONAP SDK Issue-ID: SDC-3949 Signed-off-by: Michal Jagiello <michal.jagiello@t-mobile.pl> Change-Id: Ifc51dbe287a45d5fbbee788f205d1dbe936516e4
Diffstat (limited to 'src/onaptests/steps')
-rw-r--r--src/onaptests/steps/onboard/service.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/onaptests/steps/onboard/service.py b/src/onaptests/steps/onboard/service.py
index 6f1e69f..f95cc14 100644
--- a/src/onaptests/steps/onboard/service.py
+++ b/src/onaptests/steps/onboard/service.py
@@ -2,6 +2,7 @@ import time
from typing import Any, Dict
from yaml import load, SafeLoader
+import onapsdk.constants as onapsdk_const
from onapsdk.configuration import settings
from onapsdk.exceptions import APIError, ResourceNotFound
from onapsdk.sdc.component import Component
@@ -69,7 +70,8 @@ class ServiceOnboardStep(BaseStep):
# If the service is already distributed, do not try to checkin/onboard (replay of tests)
# checkin is done if needed
# If service is replayed, no need to try to re-onboard the model
- if not service.distributed:
+ # Double check because of: https://gitlab.com/Orange-OpenSource/lfn/onap/python-onapsdk/-/issues/176
+ if not service.distributed and service.status != onapsdk_const.DISTRIBUTED:
time.sleep(10)
service.checkin()
service.onboard()
@@ -169,7 +171,8 @@ class YamlTemplateServiceOnboardStep(YamlTemplateBaseStep):
# If the service is already distributed, do not try to checkin/onboard (replay of tests)
# checkin is done if needed
# If service is replayed, no need to try to re-onboard the model
- if not service.distributed:
+ # Double check because of: https://gitlab.com/Orange-OpenSource/lfn/onap/python-onapsdk/-/issues/176
+ if not service.distributed and service.status != onapsdk_const.DISTRIBUTED:
try:
service.checkin()
except (APIError, ResourceNotFound):