summaryrefslogtreecommitdiffstats
path: root/functest/opnfv_tests/openstack/tempest/tempest.py
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2018-04-12 20:58:01 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2018-04-12 21:08:52 +0200
commit0acaa90002c7b9b19eb12db7a515ee3dce2a0243 (patch)
tree489908cf54191c8ca715c1bbc4dd56267484625c /functest/opnfv_tests/openstack/tempest/tempest.py
parent6834c086671ad9cef79eb962ea8031235ac81334 (diff)
Fix role processing in Patrole
Role has to be listed in tempest.conf before calling testr. It also saves the right config file. Change-Id: Ifd122f31d0bfe3e9b3f93c6d62526acce96953d3 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com> (cherry picked from commit 71c4b3b719289929c226cae60eb1b23ada16eeb2)
Diffstat (limited to 'functest/opnfv_tests/openstack/tempest/tempest.py')
-rw-r--r--functest/opnfv_tests/openstack/tempest/tempest.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/functest/opnfv_tests/openstack/tempest/tempest.py b/functest/opnfv_tests/openstack/tempest/tempest.py
index 22cb64c6b..9d001a82e 100644
--- a/functest/opnfv_tests/openstack/tempest/tempest.py
+++ b/functest/opnfv_tests/openstack/tempest/tempest.py
@@ -97,6 +97,16 @@ class TempestCommon(testcase.TestCase):
result['num_failures'] = int(new_line[2])
return result
+ @staticmethod
+ def backup_tempest_config(conf_file, res_dir):
+ """
+ Copy config file to tempest results directory
+ """
+ if not os.path.exists(res_dir):
+ os.makedirs(res_dir)
+ shutil.copyfile(conf_file,
+ os.path.join(res_dir, 'tempest.conf'))
+
def generate_test_list(self):
"""Generate test list based on the test mode."""
LOGGER.debug("Generating test case list...")
@@ -259,11 +269,11 @@ class TempestCommon(testcase.TestCase):
self.resources.os_creds)
self.conf_file = conf_utils.configure_verifier(self.deployment_dir)
conf_utils.configure_tempest_update_params(
- self.conf_file, self.res_dir,
- network_name=resources.get("network_name"),
+ self.conf_file, network_name=resources.get("network_name"),
image_id=resources.get("image_id"),
flavor_id=resources.get("flavor_id"),
compute_cnt=compute_cnt)
+ self.backup_tempest_config(self.conf_file, self.res_dir)
def run(self, **kwargs):
self.start_time = time.time()