summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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)