diff options
author | 2024-01-28 19:45:44 +0100 | |
---|---|---|
committer | 2024-01-29 22:24:42 +0100 | |
commit | a7edeebc90bdd335361a7b36f5f5d12a14375554 (patch) | |
tree | 0e48ee456ef26471271c5412f3205aafcda41857 /src/onaptests/steps/instantiate/vnf_ala_carte.py | |
parent | 2479155376b6142e97163a7903632015fed50815 (diff) |
Enhanced validation of configuration of all tests
Issue-ID: TEST-402
Signed-off-by: Lukasz Rajewski <lukasz.rajewski@t-mobile.pl>
Change-Id: I2e4ef6365b44c33f4c0b3e72886a83f92c63e2f3
Diffstat (limited to 'src/onaptests/steps/instantiate/vnf_ala_carte.py')
-rw-r--r-- | src/onaptests/steps/instantiate/vnf_ala_carte.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/onaptests/steps/instantiate/vnf_ala_carte.py b/src/onaptests/steps/instantiate/vnf_ala_carte.py index 2aa5e5e..e45f71e 100644 --- a/src/onaptests/steps/instantiate/vnf_ala_carte.py +++ b/src/onaptests/steps/instantiate/vnf_ala_carte.py @@ -46,7 +46,7 @@ class YamlTemplateVnfAlaCarteInstantiateStep(YamlTemplateBaseStep): """ if self.is_root: if not self._yaml_template: - with open(settings.SERVICE_YAML_TEMPLATE, "r") as yaml_template: + with open(settings.SERVICE_YAML_TEMPLATE, "r", encoding="utf-8") as yaml_template: self._yaml_template: dict = load(yaml_template, SafeLoader) return self._yaml_template return self.parent.yaml_template @@ -106,9 +106,9 @@ class YamlTemplateVnfAlaCarteInstantiateStep(YamlTemplateBaseStep): if vnf_instantiation.failed: self._logger.error("VNF instantiation %s failed", vnf.name) raise onap_test_exceptions.VnfInstantiateException - except TimeoutError: + except TimeoutError as exc: self._logger.error("VNF instantiation %s timed out", vnf.name) - raise onap_test_exceptions.VnfInstantiateException + raise onap_test_exceptions.VnfInstantiateException from exc @YamlTemplateBaseStep.store_state(cleanup=True) def cleanup(self) -> None: @@ -127,7 +127,7 @@ class YamlTemplateVnfAlaCarteInstantiateStep(YamlTemplateBaseStep): if vnf_deletion.failed: self._logger.error("VNF deletion %s failed", vnf_instance.name) raise onap_test_exceptions.VnfCleanupException - except TimeoutError: + except TimeoutError as exc: self._logger.error("VNF deletion %s timed out", vnf_instance.name) - raise onap_test_exceptions.VnfCleanupException + raise onap_test_exceptions.VnfCleanupException from exc super().cleanup() |