diff options
author | pawel.denst <pawel.denst@external.t-mobile.pl> | 2023-09-04 11:52:12 +0000 |
---|---|---|
committer | pawel.denst <pawel.denst@external.t-mobile.pl> | 2023-09-04 12:35:05 +0000 |
commit | a4f1e17b09928656c7cec2f120c9127eaf087c9d (patch) | |
tree | f3a4d1851d94b0e4010bd45291fea4f1b4d84b59 | |
parent | b21cf297006623af8332136c39dc807537351845 (diff) |
Improve-CPS-sanity-test
Improve-CPS-sanity-test
Issue-ID: INT-2263
Signed-off-by: pawel.denst <pawel.denst@external.t-mobile.pl>
Change-Id: I03c30e40667ab1796d373c8b617a18cfca7c1988
-rw-r--r-- | requirements.txt | 1 | ||||
-rw-r--r-- | src/onaptests/configuration/basic_cps_settings.py | 1 | ||||
-rw-r--r-- | src/onaptests/scenario/basic_cps.py | 4 |
3 files changed, 5 insertions, 1 deletions
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: |