aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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."