diff options
author | Krzysztof Opasiak <k.opasiak@samsung.com> | 2021-08-25 17:44:25 +0200 |
---|---|---|
committer | Krzysztof Opasiak <k.opasiak@samsung.com> | 2021-08-25 17:46:39 +0200 |
commit | 58a82a7e0a5bc010236991061aa959e55672028c (patch) | |
tree | aa647c89633301d1fcbe1a704715d346707e5c77 /src/onaptests/scenario | |
parent | 5c91aa8f3286c685a88b03a073865f2e0caf9f2a (diff) |
[TEST] Unwind master back to 27.07.2020
Unwind master due to regression in few tests.
Issue-ID: OOM-1
Change-Id: I3b759a5928aeb47fc7fddeaa5998aa090d085c5c
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Diffstat (limited to 'src/onaptests/scenario')
-rw-r--r-- | src/onaptests/scenario/cds_resource_resolution.py | 96 |
1 files changed, 0 insertions, 96 deletions
diff --git a/src/onaptests/scenario/cds_resource_resolution.py b/src/onaptests/scenario/cds_resource_resolution.py deleted file mode 100644 index 11df77f..0000000 --- a/src/onaptests/scenario/cds_resource_resolution.py +++ /dev/null @@ -1,96 +0,0 @@ -#!/usr/bin/env python -"""CDS resource resolution test scenario.""" - -import logging -import time - -from onapsdk.configuration import settings -from onapsdk.exceptions import SDKException -from xtesting.core import testcase - -from onaptests.steps.base import BaseStep -from onaptests.steps.onboard.cds import CbaProcessStep -from onaptests.steps.simulator.cds_mockserver import CdsMockserverCnfConfigureStep -from onaptests.utils.exceptions import OnapTestException - - -class CDSResourceResolutionStep(BaseStep): - """Step created to run scenario and generate report.""" - - def __init__(self, cleanup=False): - """Initialize step. - - Substeps: - - CdsMockserverCnfConfigureStep, - - CbaProcessStep. - """ - super().__init__(cleanup=cleanup) - self.add_step(CdsMockserverCnfConfigureStep( - cleanup=settings.CLEANUP_FLAG - )) - self.add_step(CbaProcessStep( - cleanup=settings.CLEANUP_FLAG - )) - - @property - def description(self) -> str: - """Step description. - - Used for reports - - Returns: - str: Step description - - """ - return "CDS resource-resoulution base step" - - @property - def component(self) -> str: - """Component name. - - Name of the component this step relates to. - Usually the name of ONAP component. - - Returns: - str: Component name - - """ - return "PythonSDK-tests" - - -class CDSResourceResolution(testcase.TestCase): - """Enrich simple blueprint using CDS blueprintprocessor.""" - - __logger = logging.getLogger(__name__) - - def __init__(self, **kwargs): - """Init CDS resource resolution use case.""" - if "case_name" not in kwargs: - kwargs["case_name"] = 'basic_cds' - super().__init__(**kwargs) - self.__logger.debug("CDS resource resolution initialization") - self.test = CDSResourceResolutionStep( - cleanup=settings.CLEANUP_FLAG) - self.start_time = None - self.stop_time = None - self.result = 0 - - def run(self): - self.__logger.debug("CDS resource resolution run") - self.start_time = time.time() - try: - self.test.execute() - self.result = 100 - except OnapTestException as exc: - self.result = 0 - self.__logger.error(exc.error_message) - except SDKException: - self.result = 0 - self.__logger.error("SDK Exception") - finally: - self.stop_time = time.time() - - def clean(self): - """Clean Additional resources if needed.""" - self.__logger.info("Generate Test report") - self.test.reports_collection.generate_report() |