aboutsummaryrefslogtreecommitdiffstats
path: root/src/onaptests/steps/wrapper
diff options
context:
space:
mode:
Diffstat (limited to 'src/onaptests/steps/wrapper')
-rw-r--r--src/onaptests/steps/wrapper/helm_charts.py3
-rw-r--r--src/onaptests/steps/wrapper/start.py4
2 files changed, 5 insertions, 2 deletions
diff --git a/src/onaptests/steps/wrapper/helm_charts.py b/src/onaptests/steps/wrapper/helm_charts.py
index f745150..874e1ff 100644
--- a/src/onaptests/steps/wrapper/helm_charts.py
+++ b/src/onaptests/steps/wrapper/helm_charts.py
@@ -29,7 +29,7 @@ class HelmChartStep(BaseStep):
chart_info_path = get_local_dir() / chart_info_file
try:
- with open(chart_info_path, 'r') as stream:
+ with open(chart_info_path, 'r', encoding="utf-8") as stream:
chart_info = yaml.safe_load(stream)
except IOError as err:
msg = f"{chart_info_file} not found."
@@ -80,6 +80,7 @@ class HelmChartStep(BaseStep):
msg = "Error during helm release installation."
raise EnvironmentPreparationException(msg) from err
+ @BaseStep.store_state(cleanup=True)
def cleanup(self) -> None:
"""Uninstall helm release."""
try:
diff --git a/src/onaptests/steps/wrapper/start.py b/src/onaptests/steps/wrapper/start.py
index 8b950da..e08f108 100644
--- a/src/onaptests/steps/wrapper/start.py
+++ b/src/onaptests/steps/wrapper/start.py
@@ -1,6 +1,7 @@
"""Start simulators via simulators' API."""
from typing import Union, Optional, Dict
import requests
+from onapsdk.configuration import settings
from onaptests.steps.base import BaseStep
from onaptests.utils.exceptions import TestConfigurationException
@@ -62,4 +63,5 @@ class SimulatorStartStep(BaseStep):
def execute(self) -> None:
"""Send a start command to the simulator application."""
super().execute()
- requests.request(self.method.upper(), self.url, **self.data)
+ requests.request(self.method.upper(), self.url, **self.data,
+ timeout=settings.DEFAULT_REQUEST_TIMEOUT)