diff options
author | Cédric Ollivier <cedric.ollivier@orange.com> | 2020-07-05 11:34:58 +0200 |
---|---|---|
committer | Cédric Ollivier <cedric.ollivier@orange.com> | 2020-07-05 11:35:35 +0200 |
commit | 2bcc39516b28d828f51eec67a334b32084d88937 (patch) | |
tree | a2f700a5e5081ba0dec0e2011395fb3aabee7367 /functest/opnfv_tests | |
parent | d273adf71f95b6705870e361b5f002ed55137f35 (diff) |
Reduce Patrole extra logic
It also reduces the skipped test list taking into account Patrole
improvements.
Change-Id: I23a8c0610a8a4258aa806451f52796f3e7bc46ca
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'functest/opnfv_tests')
3 files changed, 7 insertions, 11 deletions
diff --git a/functest/opnfv_tests/openstack/patrole/patrole.py b/functest/opnfv_tests/openstack/patrole/patrole.py index 14f2b17c5..8613d5127 100644 --- a/functest/opnfv_tests/openstack/patrole/patrole.py +++ b/functest/opnfv_tests/openstack/patrole/patrole.py @@ -24,17 +24,9 @@ class Patrole(tempest.TempestCommon): super(Patrole, self).configure(**kwargs) rconfig = configparser.RawConfigParser() rconfig.read(self.conf_file) - rconfig.add_section('rbac') - rconfig.set('rbac', 'enable_rbac', True) - rconfig.set('rbac', 'rbac_test_roles', kwargs.get('role', 'admin')) + if not rconfig.has_section('rbac'): + rconfig.add_section('rbac') + rconfig.set('rbac', 'rbac_test_roles', kwargs.get('roles', 'admin')) with open(self.conf_file, 'w') as config_file: rconfig.write(config_file) self.backup_tempest_config(self.conf_file, self.res_dir) - - def run(self, **kwargs): - for exclude in kwargs.get('excludes', []): - kwargs['mode'] = "{}(?!.*{})".format( - kwargs.get('mode', ''), exclude) - kwargs['mode'] = '{}(?=patrole_tempest_plugin.tests.api.({}))'.format( - kwargs['mode'], '|'.join(kwargs.get('includes', []))) - return super(Patrole, self).run(**kwargs) diff --git a/functest/opnfv_tests/openstack/tempest/custom_tests/tempest_conf.yaml b/functest/opnfv_tests/openstack/tempest/custom_tests/tempest_conf.yaml index 6a4d62f81..a444a54f5 100644 --- a/functest/opnfv_tests/openstack/tempest/custom_tests/tempest_conf.yaml +++ b/functest/opnfv_tests/openstack/tempest/custom_tests/tempest_conf.yaml @@ -96,3 +96,5 @@ heat_plugin: auth_version: 3 heat_features_enabled: multi_cloud: false +rbac: + enable_rbac: true diff --git a/functest/opnfv_tests/openstack/tempest/custom_tests/tempest_conf_ovn.yaml b/functest/opnfv_tests/openstack/tempest/custom_tests/tempest_conf_ovn.yaml index 5c5d5299d..141f295b4 100644 --- a/functest/opnfv_tests/openstack/tempest/custom_tests/tempest_conf_ovn.yaml +++ b/functest/opnfv_tests/openstack/tempest/custom_tests/tempest_conf_ovn.yaml @@ -96,3 +96,5 @@ heat_plugin: auth_version: 3 heat_features_enabled: multi_cloud: false +rbac: + enable_rbac: true |