From a4f1e17b09928656c7cec2f120c9127eaf087c9d Mon Sep 17 00:00:00 2001 From: "pawel.denst" Date: Mon, 4 Sep 2023 11:52:12 +0000 Subject: Improve-CPS-sanity-test Improve-CPS-sanity-test Issue-ID: INT-2263 Signed-off-by: pawel.denst Change-Id: I03c30e40667ab1796d373c8b617a18cfca7c1988 --- requirements.txt | 1 + src/onaptests/configuration/basic_cps_settings.py | 1 + src/onaptests/scenario/basic_cps.py | 4 +++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 73655b3..945dc90 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,3 +7,4 @@ jinja2>3 kubernetes>=22.6.0 setuptools==65.3.0 natural==0.2.0 +pg8000==1.30.1 diff --git a/src/onaptests/configuration/basic_cps_settings.py b/src/onaptests/configuration/basic_cps_settings.py index 896469e..690499f 100644 --- a/src/onaptests/configuration/basic_cps_settings.py +++ b/src/onaptests/configuration/basic_cps_settings.py @@ -73,3 +73,4 @@ DB_PRIMARY_HOST = "cps-core-pg-primary" DB_PORT = 5432 DB_LOGIN = "login" DB_PASSWORD = "password" +CHECK_POSTGRESQL = False \ No newline at end of file diff --git a/src/onaptests/scenario/basic_cps.py b/src/onaptests/scenario/basic_cps.py index 59ecf96..adfefb5 100644 --- a/src/onaptests/scenario/basic_cps.py +++ b/src/onaptests/scenario/basic_cps.py @@ -1,5 +1,6 @@ #!/usr/bin/env python """Basic CPS test case.""" +from onapsdk.configuration import settings from onaptests.scenario.scenario_base import BaseStep, ScenarioBase from onaptests.steps.onboard.cps import (CheckPostgressDataBaseConnectionStep, QueryCpsAnchorNodeStep) @@ -15,7 +16,8 @@ class BasicCpsStep(BaseStep): """ super().__init__(cleanup=BaseStep.HAS_NO_CLEANUP) self.add_step(QueryCpsAnchorNodeStep()) - self.add_step(CheckPostgressDataBaseConnectionStep()) + if settings.CHECK_POSTGRESQL: + self.add_step(CheckPostgressDataBaseConnectionStep()) @property def description(self) -> str: -- cgit 1.2.3-korg