summaryrefslogtreecommitdiffstats
path: root/testcases/OpenStack/tempest
diff options
context:
space:
mode:
authorvitikkan <viktor.tikkanen@nokia.com>2016-08-04 11:04:38 +0300
committervitikkan <viktor.tikkanen@nokia.com>2016-08-04 11:12:36 +0300
commit89077063cf7357727fbcb4b58c852784812405ee (patch)
tree06801e1e221820b4cdafa52b062c5b6d4fdea7c5 /testcases/OpenStack/tempest
parent5f0d2316d91b40a6cf62b15b309b0c2e2d2f582c (diff)
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 <viktor.tikkanen@nokia.com>
Diffstat (limited to 'testcases/OpenStack/tempest')
-rwxr-xr-xtestcases/OpenStack/tempest/run_tempest.py8
1 files changed, 6 insertions, 2 deletions
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)