diff options
author | Michal Jagiello <michal.jagiello@t-mobile.pl> | 2021-12-20 07:25:45 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2021-12-20 07:25:45 +0000 |
commit | 2bd16f8898e6fd74e64b1500eb5fbc4448517d1a (patch) | |
tree | 6511af60374903774c8e0c2ed581bbcabce89e5b /src/onaptests/scenario | |
parent | fdb23f5d0a2ac49ac35578be855f2b937741136f (diff) | |
parent | 54803e59a08d09bbb34cb686740f41b1e7bc3684 (diff) |
Merge "[TEST] Do not create simulators in "onap" namespace"
Diffstat (limited to 'src/onaptests/scenario')
-rw-r--r-- | src/onaptests/scenario/basic_vm_macro.py | 6 | ||||
-rw-r--r-- | src/onaptests/scenario/cds_blueprint_enrichment.py | 8 | ||||
-rw-r--r-- | src/onaptests/scenario/pnf_macro.py | 6 |
3 files changed, 11 insertions, 9 deletions
diff --git a/src/onaptests/scenario/basic_vm_macro.py b/src/onaptests/scenario/basic_vm_macro.py index 67dded9..8bbf0b7 100644 --- a/src/onaptests/scenario/basic_vm_macro.py +++ b/src/onaptests/scenario/basic_vm_macro.py @@ -25,10 +25,10 @@ class BasicVmMacroStep(YamlTemplateBaseStep): super().__init__(cleanup=cleanup) self._yaml_template: dict = None self.add_step(CbaPublishStep( - cleanup=settings.CLEANUP_FLAG + cleanup=cleanup )) self.add_step(YamlTemplateServiceMacroInstantiateStep( - cleanup=settings.CLEANUP_FLAG + cleanup=cleanup )) @property @@ -101,7 +101,7 @@ class BasicVmMacroStep(YamlTemplateBaseStep): class BasicVmMacro(testcase.TestCase): """Instantiate a basic vm macro.""" - __logger = logging.getLogger(__name__) + __logger = logging.getLogger() def __init__(self, **kwargs): """Init Basic Macro use case.""" diff --git a/src/onaptests/scenario/cds_blueprint_enrichment.py b/src/onaptests/scenario/cds_blueprint_enrichment.py index 3354ee1..c442780 100644 --- a/src/onaptests/scenario/cds_blueprint_enrichment.py +++ b/src/onaptests/scenario/cds_blueprint_enrichment.py @@ -15,7 +15,7 @@ from onaptests.utils.exceptions import OnapTestException class CDSBlueprintEnrichment(testcase.TestCase): """Enrich simple blueprint using CDS blueprintprocessor.""" - __logger = logging.getLogger(__name__) + __logger = logging.getLogger() def __init__(self, **kwargs): """Init CDS blueprint enrichment use case.""" @@ -34,13 +34,15 @@ class CDSBlueprintEnrichment(testcase.TestCase): self.start_time = time.time() try: self.test.execute() + if settings.CLEANUP_FLAG: + self.test.cleanup() self.result = 100 except OnapTestException as exc: self.result = 0 - self.__logger.error(exc.error_message) + self.__logger.exception(exc.error_message) except SDKException: self.result = 0 - self.__logger.error("SDK Exception") + self.__logger.exception("SDK Exception") finally: self.stop_time = time.time() diff --git a/src/onaptests/scenario/pnf_macro.py b/src/onaptests/scenario/pnf_macro.py index 73a2adf..7b7c219 100644 --- a/src/onaptests/scenario/pnf_macro.py +++ b/src/onaptests/scenario/pnf_macro.py @@ -26,13 +26,13 @@ class PnfMacroScenarioStep(YamlTemplateBaseStep): super().__init__(cleanup=cleanup) self._yaml_template: dict = None self.add_step(PnfSimulatorCnfRegisterStep( - cleanup=settings.CLEANUP_FLAG + cleanup=cleanup )) self.add_step(CbaEnrichStep( - cleanup=settings.CLEANUP_FLAG + cleanup=cleanup )) self.add_step(YamlTemplateServiceMacroInstantiateStep( - cleanup=settings.CLEANUP_FLAG + cleanup=cleanup )) @property |