Fix onap tests bench library to run stability tests with customized service definition 46/132546/1
authorMichal Jagiello <michal.jagiello@t-mobile.pl>
Thu, 1 Dec 2022 11:51:54 +0000 (11:51 +0000)
committerMichal Jagiello <michal.jagiello@t-mobile.pl>
Thu, 1 Dec 2022 11:51:54 +0000 (11:51 +0000)
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

test/onaptests_bench/src/onaptests_bench/launcher.py

index d8c311c..d7f96f3 100644 (file)
@@ -70,8 +70,9 @@ DEFAULT_SIMU_TESTS = 5
 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 @@ def execute_test(serie_number, test_number,
                  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