aboutsummaryrefslogtreecommitdiffstats
path: root/testcases/OpenStack/rally/run_rally-cert.py
diff options
context:
space:
mode:
authorJuha Kosonen <juha.kosonen@nokia.com>2016-09-30 09:21:29 +0000
committerJuha Kosonen <juha.kosonen@nokia.com>2016-09-30 13:32:26 +0000
commite80c3b71aab51aa0a54b8c27047b987aa4345cd2 (patch)
tree5488c334b68bd94605b919b4031f283bbaddcf81 /testcases/OpenStack/rally/run_rally-cert.py
parent0e7ef6e103809f9f13c2b533eb589c3ac9c3fe14 (diff)
Refactor rally task scenario files
Use a dedicated scenario file for each scenario (full, sanity) instead of a shared one. JIRA: FUNCTEST-501 Change-Id: Icd45d6bf11b605f073c2667e9948589ee0a3b75c Signed-off-by: Juha Kosonen <juha.kosonen@nokia.com>
Diffstat (limited to 'testcases/OpenStack/rally/run_rally-cert.py')
-rwxr-xr-xtestcases/OpenStack/rally/run_rally-cert.py16
1 files changed, 12 insertions, 4 deletions
diff --git a/testcases/OpenStack/rally/run_rally-cert.py b/testcases/OpenStack/rally/run_rally-cert.py
index 29fd0a33..d35639cc 100755
--- a/testcases/OpenStack/rally/run_rally-cert.py
+++ b/testcases/OpenStack/rally/run_rally-cert.py
@@ -75,6 +75,8 @@ logger = ft_logger.Logger("run_rally").getLogger()
HOME = os.environ['HOME'] + "/"
RALLY_DIR = ft_utils.FUNCTEST_REPO + '/' + \
ft_utils.get_functest_config('general.directories.dir_rally')
+SANITY_MODE_DIR = RALLY_DIR + "scenario/sanity"
+FULL_MODE_DIR = RALLY_DIR + "scenario/full"
TEMPLATE_DIR = RALLY_DIR + "scenario/templates"
SUPPORT_DIR = RALLY_DIR + "scenario/support"
TEMP_DIR = RALLY_DIR + "var"
@@ -173,10 +175,8 @@ def build_task_args(test_file_name):
task_args['concurrency'] = CONCURRENCY
if args.sanity:
- task_args['full_mode'] = False
task_args['smoke'] = True
else:
- task_args['full_mode'] = True
task_args['smoke'] = args.smoke
ext_net = os_utils.get_external_net(neutron_client)
@@ -319,8 +319,16 @@ def prepare_test_list(test_name):
scenario_file_name = '{}opnfv-{}.yaml'.format(RALLY_DIR + "scenario/",
test_name)
if not os.path.exists(scenario_file_name):
- logger.info("The scenario '%s' does not exist." % scenario_file_name)
- exit(-1)
+ if args.sanity:
+ scenario_file_name = '{}opnfv-{}.yaml'.format(SANITY_MODE_DIR +
+ "/", test_name)
+ else:
+ scenario_file_name = '{}opnfv-{}.yaml'.format(FULL_MODE_DIR +
+ "/", test_name)
+ if not os.path.exists(scenario_file_name):
+ logger.info("The scenario '%s' does not exist."
+ % scenario_file_name)
+ exit(-1)
logger.debug('Scenario fetched from : {}'.format(scenario_file_name))
test_file_name = '{}opnfv-{}.yaml'.format(TEMP_DIR + "/", test_name)