diff options
author | 2021-02-10 21:19:59 +0000 | |
---|---|---|
committer | 2021-02-11 09:15:03 +0000 | |
commit | 1b96f9912524dddf6d656e096626800df32db0be (patch) | |
tree | 3355364a7d04dbf53aea1fdc3f881d17416a9a4d /src/onaptests/scenario/basic_network.py | |
parent | 329e4445434d3a34f2ccd3ccbd48cdbae21dada0 (diff) |
[INT] Catch all onaptests and onapsdk exceptions for scenarios
Catch onaptests and onapsdk exceptions in scenario to generate test report if test fails
Issue-ID: INT-1852
Signed-off-by: Michal Jagiello <michal.jagiello@t-mobile.pl>
Change-Id: Id9772fea10dc5aa323437e72c6fe5ddb4c6caabb
Diffstat (limited to 'src/onaptests/scenario/basic_network.py')
-rw-r--r-- | src/onaptests/scenario/basic_network.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/onaptests/scenario/basic_network.py b/src/onaptests/scenario/basic_network.py index 7a0b9f7..1b7bd14 100644 --- a/src/onaptests/scenario/basic_network.py +++ b/src/onaptests/scenario/basic_network.py @@ -7,8 +7,8 @@ from xtesting.core import testcase from onapsdk.configuration import settings from onapsdk.exceptions import SDKException -import onaptests.utils.exceptions as onap_test_exceptions from onaptests.steps.instantiate.vl_ala_carte import YamlTemplateVlAlaCarteInstantiateStep +from onaptests.utils.exceptions import OnapTestException class BasicNetwork(testcase.TestCase): """Onboard then instantiate a simple Network with ONAP.""" @@ -47,7 +47,7 @@ class BasicNetwork(testcase.TestCase): else: self.__logger.info("No cleanup requested. Test completed.") self.result = 100 - except onap_test_exceptions.OnapTestException as exc: + except (OnapTestException, SDKException) as exc: self.result = 0 self.__logger.error(exc.error_message) finally: |