diff options
Diffstat (limited to 'testcases')
-rwxr-xr-x | testcases/OpenStack/tempest/run_tempest.py | 11 | ||||
-rwxr-xr-x | testcases/features/doctor.py | 3 | ||||
-rw-r--r-- | testcases/vnf/RNC/parser.py | 27 |
3 files changed, 17 insertions, 24 deletions
diff --git a/testcases/OpenStack/tempest/run_tempest.py b/testcases/OpenStack/tempest/run_tempest.py index 53a70b799..d29b3f3bc 100755 --- a/testcases/OpenStack/tempest/run_tempest.py +++ b/testcases/OpenStack/tempest/run_tempest.py @@ -81,6 +81,8 @@ TENANT_DESCRIPTION = functest_yaml.get("tempest").get("identity").get( USER_NAME = functest_yaml.get("tempest").get("identity").get("user_name") USER_PASSWORD = functest_yaml.get("tempest").get("identity").get( "user_password") +SSH_TIMEOUT = functest_yaml.get("tempest").get("validation").get( + "ssh_timeout") DEPLOYMENT_MAME = functest_yaml.get("rally").get("deployment_name") RALLY_INSTALLATION_DIR = functest_yaml.get("general").get("directories").get( "dir_rally_inst") @@ -176,12 +178,16 @@ def configure_tempest(deployment_dir): Add/update needed parameters into tempest.conf file generated by Rally """ - logger.debug("Generating tempest.conf file...") + tempest_conf_file = deployment_dir + "/tempest.conf" + if os.path.isfile(tempest_conf_file): + logger.debug("Deleting old tempest.conf file...") + os.remove(tempest_conf_file) + + logger.debug("Generating new tempest.conf file...") cmd = "rally verify genconfig" ft_utils.execute_command(cmd, logger) logger.debug("Finding tempest.conf file...") - tempest_conf_file = deployment_dir + "/tempest.conf" if not os.path.isfile(tempest_conf_file): logger.error("Tempest configuration file %s NOT found." % tempest_conf_file) @@ -194,6 +200,7 @@ def configure_tempest(deployment_dir): config.set('identity', 'tenant_name', TENANT_NAME) config.set('identity', 'username', USER_NAME) config.set('identity', 'password', USER_PASSWORD) + config.set('validation', 'ssh_timeout', SSH_TIMEOUT) if os.getenv('OS_ENDPOINT_TYPE') is not None: services_list = ['compute', 'volume', 'image', 'network', diff --git a/testcases/features/doctor.py b/testcases/features/doctor.py index bdf3ddc35..184ab032b 100755 --- a/testcases/features/doctor.py +++ b/testcases/features/doctor.py @@ -37,7 +37,8 @@ def main(): cmd = 'cd %s/tests && ./run.sh' % DOCTOR_REPO start_time = time.time() - ret = functest_utils.execute_command(cmd, logger, exit_on_error=False) + ret = functest_utils.execute_command(cmd, logger, info=True, + exit_on_error=False) stop_time = time.time() duration = round(stop_time - start_time, 1) diff --git a/testcases/vnf/RNC/parser.py b/testcases/vnf/RNC/parser.py index 485af0e14..91d5bb06a 100644 --- a/testcases/vnf/RNC/parser.py +++ b/testcases/vnf/RNC/parser.py @@ -32,33 +32,18 @@ logger = ft_logger.Logger("parser").getLogger() def main(): - EXIT_CODE = -1 project = 'parser' case_name = 'parser-basics' cmd = 'cd %s/tests && ./functest_run.sh' % PARSER_REPO - start_time = time.time() + start_time = time.time() ret = functest_utils.execute_command(cmd, logger, exit_on_error=False) - stop_time = time.time() - duration = round(stop_time - start_time, 1) - if ret == 0: - EXIT_CODE = 0 - logger.info("parser OK") - test_status = 'OK' - else: - logger.info("parser FAILED") - test_status = 'NOK' - - details = { - 'timestart': start_time, - 'duration': duration, - 'status': test_status, - } - status = "FAIL" - if details['status'] == "OK": - status = "PASS" + status, details = functest_utils.check_test_result(case_name, + ret, + start_time, + stop_time) functest_utils.logger_test_results(logger, project, @@ -73,7 +58,7 @@ def main(): stop_time, status, details) - exit(EXIT_CODE) + exit(ret) if __name__ == '__main__': main() |