summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2018-07-12 05:34:54 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2018-07-12 05:36:03 +0200
commit9ee6578f53897adfb08fb810d243b35bd1ed2b23 (patch)
tree1752ad07e311122964c1a011c65f9a8669aa95db
parent5af20a463fb35d73a8be77715af6d91a00834ef0 (diff)
Avoid duplicating tempest section in rally.conf
Change-Id: I79598cce2c7dfe0a2e969ddd32735c3eb189fa7a Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com> (cherry picked from commit 8b912cec489a96178fcac5667c03e20850149c3a)
-rw-r--r--functest/opnfv_tests/openstack/tempest/tempest.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/functest/opnfv_tests/openstack/tempest/tempest.py b/functest/opnfv_tests/openstack/tempest/tempest.py
index 818b6cc0b..23708cafe 100644
--- a/functest/opnfv_tests/openstack/tempest/tempest.py
+++ b/functest/opnfv_tests/openstack/tempest/tempest.py
@@ -262,7 +262,8 @@ class TempestCommon(singlevm.VmReady1):
"""Set image name as tempest img_name_regex"""
rconfig = configparser.RawConfigParser()
rconfig.read(rally_conf)
- rconfig.add_section('tempest')
+ if not rconfig.has_section('tempest'):
+ rconfig.add_section('tempest')
rconfig.set('tempest', 'img_name_regex', '^{}$'.format(
self.image.name))
with open(rally_conf, 'wb') as config_file: