diff options
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 |