diff options
author | Lukasz Rajewski <lukasz.rajewski@t-mobile.pl> | 2024-03-06 17:05:36 +0100 |
---|---|---|
committer | Lukasz Rajewski <lukasz.rajewski@t-mobile.pl> | 2024-03-07 09:22:20 +0100 |
commit | 84d5f2dcb68a409af76de545ec02656ccd761e14 (patch) | |
tree | 6d52db4740f73d950ef5554d4c399d5d03aa67cf /src/onaptests | |
parent | 7ccb34ecddc674ad23ed1f0e607fd12b6d5954b9 (diff) |
SDNC distribution status check fix
SDNC distribution status check fix
Issue-ID: TEST-404
Signed-off-by: Lukasz Rajewski <lukasz.rajewski@t-mobile.pl>
Change-Id: Icc494a06f622dcebf02846cc00121b6d7ebb45fa
Diffstat (limited to 'src/onaptests')
-rw-r--r-- | src/onaptests/steps/onboard/service.py | 10 |
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." |