From 89077063cf7357727fbcb4b58c852784812405ee Mon Sep 17 00:00:00 2001 From: vitikkan Date: Thu, 4 Aug 2016 11:04:38 +0300 Subject: Re-generating tempest.conf file before starting tests "rally verify genconfig" command doesn't generate tempest.conf file if it already exists in the used deployment. This can cause troubles if some resources (images, flavors etc.) change between consecutive runs of tempest. The change ensures that tempest.conf is deleted before executing "rally verify genconfig". JIRA: FUNCTEST-403 Change-Id: Icf5e380da3cb8757f4177b49028937355e2cf1d7 Signed-off-by: vitikkan --- testcases/OpenStack/tempest/run_tempest.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'testcases/OpenStack') diff --git a/testcases/OpenStack/tempest/run_tempest.py b/testcases/OpenStack/tempest/run_tempest.py index 53a70b799..4a8a3d066 100755 --- a/testcases/OpenStack/tempest/run_tempest.py +++ b/testcases/OpenStack/tempest/run_tempest.py @@ -176,12 +176,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) -- cgit 1.2.3-korg