From 4bccbde3060931c8fcf61fbf8b61db4a85b3200e Mon Sep 17 00:00:00 2001 From: Lukasz Rajewski Date: Thu, 27 Jul 2023 14:59:15 +0000 Subject: Change cleanup process of tests Issue-ID: TEST-402 Signed-off-by: Lukasz Rajewski Change-Id: Iffe3aeaa4eab6adcabc94d143d1f94a684cd4657 --- src/onaptests/utils/exceptions.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/onaptests/utils/exceptions.py') diff --git a/src/onaptests/utils/exceptions.py b/src/onaptests/utils/exceptions.py index 6842714..978e628 100644 --- a/src/onaptests/utils/exceptions.py +++ b/src/onaptests/utils/exceptions.py @@ -14,6 +14,15 @@ class OnapTestException(Exception): error_message = 'Generic OnapTest exception' +class OnapTestExceptionGroup(ExceptionGroup, OnapTestException): # noqa + """Group of Onap Test Exceptions.""" + error_message = 'Generic OnapTest exception group' + + +class SkipExecutionException(OnapTestException): + """Used only for validation purposes""" + + class TestConfigurationException(OnapTestException): """Raise when configuration of the use case is incomplete or buggy.""" error_message = 'Configuration error' @@ -83,6 +92,10 @@ class SubstepExecutionException(OnapTestException): """Exception raised if substep execution fails.""" +class SubstepExecutionExceptionGroup(ExceptionGroup, SubstepExecutionException): # noqa + """Group of Substep Exceptions.""" + + class EnvironmentCleanupException(OnapTestException): """Test environment cleanup exception.""" error_message = "Test couldn't finish a cleanup" -- cgit 1.2.3-korg