aboutsummaryrefslogtreecommitdiffstats
path: root/src/onaptests/steps/onboard
diff options
context:
space:
mode:
authorMicha? Jagie??o <michal.jagiello@t-mobile.pl>2024-03-07 14:42:18 +0000
committerGerrit Code Review <gerrit@onap.org>2024-03-07 14:42:18 +0000
commit14a16a826c0f91593699c1fb63f2d62f7ce02e60 (patch)
tree306aac4b16bd48d1e0ba0470653d93735fc1712e /src/onaptests/steps/onboard
parent4af6cc86c97d4e72c70190e0888e6c558a0acc13 (diff)
parent84d5f2dcb68a409af76de545ec02656ccd761e14 (diff)
Merge "SDNC distribution status check fix"
Diffstat (limited to 'src/onaptests/steps/onboard')
-rw-r--r--src/onaptests/steps/onboard/service.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/onaptests/steps/onboard/service.py b/src/onaptests/steps/onboard/service.py
index b482cff..9243d97 100644
--- a/src/onaptests/steps/onboard/service.py
+++ b/src/onaptests/steps/onboard/service.py
@@ -426,13 +426,13 @@ class VerifyServiceDistributionInSdncStep(BaseServiceDistributionComponentCheckS
password=password)
cursor = conn.cursor()
cursor.execute(
- f"SELECT * FROM service_model WHERE service_uuid = '{self.service.uuid}'")
- for _ in cursor:
- pass
- if cursor.rowcount == 0:
- msg = f"Service {self.service.name} is missing in SDNC."
+ f"SELECT * FROM service_model WHERE service_uuid = '{self.service.uuid}';")
+ cursor.fetchall()
+ if cursor.rowcount <= 0:
+ msg = "Service model is missing in SDNC."
self._logger.error(msg)
raise onap_test_exceptions.ServiceDistributionException(msg)
+ self._logger.info("Service found in SDNC")
cursor.close()
except Exception as e:
msg = f"Service {self.service.name} is missing in SDNC."