summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2018-03-10 13:34:43 +0100
committerCédric Ollivier <cedric.ollivier@orange.com>2018-03-10 14:12:20 +0100
commit8700960a0edf662734259273ca002f2ac2050e21 (patch)
treef5f5d4ef09f13eba25695724cdea6b9a9bbb6d70
parent35a6fcd790a173bb759499b43d25f081ed4adfed (diff)
Enhance patrole configurations
It allows listing the OpenStack services tested or setting test exlusions (e.g. tests requiring GRE as overlay). It should be noted that Keystone and Nova can't currently be tested without their default policy.json. Change-Id: I8909694b4ffc315959504441f5ea0b1f3023fe7c Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
-rw-r--r--docker/patrole/testcases.yaml6
-rw-r--r--functest/opnfv_tests/openstack/patrole/patrole.py6
2 files changed, 10 insertions, 2 deletions
diff --git a/docker/patrole/testcases.yaml b/docker/patrole/testcases.yaml
index 5615a9055..5d9199cdc 100644
--- a/docker/patrole/testcases.yaml
+++ b/docker/patrole/testcases.yaml
@@ -22,3 +22,9 @@ tiers:
class: 'Patrole'
args:
role: 'admin'
+ services:
+ - 'image'
+ - 'network'
+ - 'volume'
+ exclude:
+ - 'test_networks_multiprovider_rbac'
diff --git a/functest/opnfv_tests/openstack/patrole/patrole.py b/functest/opnfv_tests/openstack/patrole/patrole.py
index 8f30c482d..1f1674564 100644
--- a/functest/opnfv_tests/openstack/patrole/patrole.py
+++ b/functest/opnfv_tests/openstack/patrole/patrole.py
@@ -29,8 +29,6 @@ class Patrole(tempest.TempestCommon):
if "case_name" not in kwargs:
kwargs["case_name"] = 'patrole'
super(Patrole, self).__init__(**kwargs)
- self.mode = ("'(?!.*test_networks_multiprovider_rbac)"
- "(?=patrole_tempest_plugin.tests.api.(image|network))'")
self.res_dir = os.path.join(
getattr(config.CONF, 'dir_results'), 'patrole')
self.raw_list = os.path.join(self.res_dir, 'test_raw_list.txt')
@@ -38,6 +36,10 @@ class Patrole(tempest.TempestCommon):
def run(self, **kwargs):
self.start_time = time.time()
+ for exclude in kwargs.get('exclude', []):
+ self.mode = "{}(?!.*{})".format(self.mode, exclude)
+ self.mode = "'{}(?=patrole_tempest_plugin.tests.api.({}))'".format(
+ self.mode, '|'.join(kwargs.get('services', [])))
try:
if not os.path.exists(self.res_dir):
os.makedirs(self.res_dir)