aboutsummaryrefslogtreecommitdiffstats
path: root/src/onaptests/scenario
diff options
context:
space:
mode:
authorpawel.denst <pawel.denst@external.t-mobile.pl>2023-08-31 13:57:59 +0000
committerpawel.denst <pawel.denst@external.t-mobile.pl>2023-09-01 09:29:30 +0000
commitda29da250e5badd022c1dfb977c2d8b91f8837c8 (patch)
tree433e17e9e0d1e905e6f58bd16942a42790e25c8c /src/onaptests/scenario
parent190b7b8ca15a545ec83424bc2367dab954780f32 (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: I64c54920d1c70c5aa8befb058402fe234eaab1e8
Diffstat (limited to 'src/onaptests/scenario')
-rw-r--r--src/onaptests/scenario/basic_cps.py49
1 files changed, 45 insertions, 4 deletions
diff --git a/src/onaptests/scenario/basic_cps.py b/src/onaptests/scenario/basic_cps.py
index 13a3d37..59ecf96 100644
--- a/src/onaptests/scenario/basic_cps.py
+++ b/src/onaptests/scenario/basic_cps.py
@@ -1,7 +1,46 @@
#!/usr/bin/env python
"""Basic CPS test case."""
-from onaptests.scenario.scenario_base import ScenarioBase
-from onaptests.steps.onboard.cps import CreateCpsAnchorNodeStep
+from onaptests.scenario.scenario_base import BaseStep, ScenarioBase
+from onaptests.steps.onboard.cps import (CheckPostgressDataBaseConnectionStep,
+ QueryCpsAnchorNodeStep)
+
+
+class BasicCpsStep(BaseStep):
+ def __init__(self):
+ """Initialize step.
+
+ Substeps:
+ - QueryCpsAnchorNodeStep
+ - CheckPostgressDataBaseConnectionStep.
+ """
+ super().__init__(cleanup=BaseStep.HAS_NO_CLEANUP)
+ self.add_step(QueryCpsAnchorNodeStep())
+ self.add_step(CheckPostgressDataBaseConnectionStep())
+
+ @property
+ def description(self) -> str:
+ """Step description.
+
+ Used for reports
+
+ Returns:
+ str: Step description
+
+ """
+ return "Basic CPS scenario step"
+
+ @property
+ def component(self) -> str:
+ """Component name.
+
+ Name of component which step is related with.
+ Most is the name of ONAP component.
+
+ Returns:
+ str: Component name
+
+ """
+ return "TEST"
class BasicCps(ScenarioBase):
@@ -9,7 +48,9 @@ class BasicCps(ScenarioBase):
- dataspace
- schemaset
- anchor
- And create a node. Use bookstore YANG model (available on CPS repository
+ - node
+ Update and Query on node
+ And check PostgreSQL connection. Use bookstore YANG model (available on CPS repository
https://github.com/onap/cps/blob/master/cps-service/src/test/resources/bookstore.yang).
At the end delete what's available to be deleted.
@@ -18,4 +59,4 @@ class BasicCps(ScenarioBase):
def __init__(self, **kwargs):
"""Init Basic CPS."""
super().__init__('basic_cps', **kwargs)
- self.test = CreateCpsAnchorNodeStep()
+ self.test = BasicCpsStep()