Fix onap tests bench library to run stability tests with customized service definition
Stability tests are executed with custom service definiton only.
Issue-ID: INT-2150
Signed-off-by: Michal Jagiello <michal.jagiello@t-mobile.pl>
Change-Id: I78c4e72536b5bf9b116c5e164259b7bd0a398234
diff --git a/test/onaptests_bench/src/onaptests_bench/launcher.py b/test/onaptests_bench/src/onaptests_bench/launcher.py
index d8c311c..d7f96f3 100644
--- a/test/onaptests_bench/src/onaptests_bench/launcher.py
+++ b/test/onaptests_bench/src/onaptests_bench/launcher.py
@@ -70,8 +70,9 @@
DEFAULT_TEST_DURATION = 180 # duration in minutes
RESULT_PATH = "/tmp"
ONAPTEST_BENCH_WAIT_TIMER = 40
-ONAPTESTS_SETTINGS = ("/usr/lib/python3.8/site-packages/onaptests" +
- "/configuration/settings.py")
+ONAPTESTS_PATH = "/usr/lib/python3.8/site-packages/onaptests"
+ONAPTESTS_SETTINGS = f"{ONAPTESTS_PATH}/configuration/settings.py"
+ONAPTESTS_SERVICE_DIR = f"{ONAPTESTS_PATH}/templates/vnf-services"
CLUSTER_IP = "127.0.0.1"
@@ -179,7 +180,8 @@
f'{HOMEPATH}/.config/openstack/clouds.yaml':{'bind': '/root/.config/openstack/clouds.yaml', 'mode': 'rw'}, # pylint: disable=line-too-long
volume_reporting:{'bind':'/var/lib/xtesting/results', 'mode': 'rw'},
f'{HOMEPATH}/.kube/config':{'bind':'/root/.kube/config', 'mode': 'rw'},
- os.path.dirname(os.path.abspath(__file__)) + '/artifacts/settings.py':{'bind': ONAPTESTS_SETTINGS, 'mode': 'rw'}}) # pylint: disable=line-too-long
+ os.path.dirname(os.path.abspath(__file__)) + '/artifacts/settings.py':{'bind': ONAPTESTS_SETTINGS, 'mode': 'rw'}, # pylint: disable=line-too-long
+ f'/tmp/xtesting/smoke-usecases/{ARGS.test}/{ARGS.test}-service.yaml': {'bind': f'{ONAPTESTS_SERVICE_DIR}/{ARGS.test}-service.yaml', 'mode': 'rw'}}) # pylint: disable=line-too-long
return this_container