diff options
author | Cédric Ollivier <cedric.ollivier@orange.com> | 2018-08-17 11:22:14 +0200 |
---|---|---|
committer | Cédric Ollivier <cedric.ollivier@orange.com> | 2018-08-17 11:22:14 +0200 |
commit | 84d8296c5f28ad20f0e32cbfe5af36013da0a213 (patch) | |
tree | 159554b14371b2cbe53d381e0fb459e427854d42 | |
parent | 2eee07c6e775eadcdc32ad77a90b386b83cda5ba (diff) |
Clean /etc/rally.conf
Else rally_sanity may print logs in tempest_smoke res dir.
Change-Id: Iae97d533e9b99dcf8da70229b0675228472bfe52
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
-rw-r--r-- | functest/opnfv_tests/openstack/tempest/tempest.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/functest/opnfv_tests/openstack/tempest/tempest.py b/functest/opnfv_tests/openstack/tempest/tempest.py index 452c82d26..1182f2339 100644 --- a/functest/opnfv_tests/openstack/tempest/tempest.py +++ b/functest/opnfv_tests/openstack/tempest/tempest.py @@ -315,6 +315,22 @@ class TempestCommon(singlevm.VmReady1): with open(rally_conf, 'wb') as config_file: rconfig.write(config_file) + @staticmethod + def clean_rally_conf(rally_conf='/etc/rally/rally.conf'): + """Clean Rally config""" + rconfig = configparser.RawConfigParser() + rconfig.read(rally_conf) + if rconfig.has_option('tempest', 'img_name_regex'): + rconfig.remove_option('tempest', 'img_name_regex') + if rconfig.has_option('tempest', 'swift_operator_role'): + rconfig.remove_option('tempest', 'swift_operator_role') + if rconfig.has_option('DEFAULT', 'log-file'): + rconfig.remove_option('DEFAULT', 'log-file') + if rconfig.has_option('DEFAULT', 'log_dir'): + rconfig.remove_option('DEFAULT', 'log_dir') + with open(rally_conf, 'wb') as config_file: + rconfig.write(config_file) + def configure(self, **kwargs): # pylint: disable=unused-argument """ Create all openstack resources for tempest-based testcases and write @@ -364,6 +380,7 @@ class TempestCommon(singlevm.VmReady1): """ Cleanup all OpenStack objects. Should be called on completion. """ + self.clean_rally_conf() if self.image_alt: self.cloud.delete_image(self.image_alt) if self.flavor_alt: |