diff options
Diffstat (limited to 'src/onaptests/utils')
-rw-r--r-- | src/onaptests/utils/exceptions.py | 4 | ||||
-rw-r--r-- | src/onaptests/utils/simulators.py | 13 |
2 files changed, 17 insertions, 0 deletions
diff --git a/src/onaptests/utils/exceptions.py b/src/onaptests/utils/exceptions.py index e453d67..c12ee2f 100644 --- a/src/onaptests/utils/exceptions.py +++ b/src/onaptests/utils/exceptions.py @@ -74,3 +74,7 @@ class EnvironmentPreparationException(OnapTestException): class SubstepExecutionException(OnapTestException): """Exception raised if substep execution fails.""" + +class EnvironmentCleanupException(OnapTestException): + """Test environment cleanup exception.""" + error_message="Test couldn't finish a cleanup" diff --git a/src/onaptests/utils/simulators.py b/src/onaptests/utils/simulators.py new file mode 100644 index 0000000..08acdbd --- /dev/null +++ b/src/onaptests/utils/simulators.py @@ -0,0 +1,13 @@ +"""Standard functions for the simulator wrapper.""" +from importlib.resources import path + +def get_local_dir(): + """Get the default path for helm charts. + + Returns: + chart_directory (Path): + local helm chart folder relative to the package. + """ + with path('onaptests', 'templates') as templates: + chart_directory = templates / 'helm_charts' + return chart_directory |