From 29a384491df24cbace49d822a636c52649264f60 Mon Sep 17 00:00:00 2001 From: =?utf8?q?C=C3=A9dric=20Ollivier?= Date: Wed, 7 Mar 2018 10:26:26 +0100 Subject: [PATCH] Add neutron and glance policy.json for patrole MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit It only runs tests about neutron and glance because their policy.json can be still downloaded. Installers could override them via docker volumes if needed. Several tests about provider networks are currently excluded because GRE is selected. Change-Id: Ic4e2274e3f53e66be0174e117993e8c307b96bf9 Signed-off-by: Cédric Ollivier --- docker/patrole/Dockerfile | 3 +++ docker/patrole/testcases.yaml | 2 ++ functest/opnfv_tests/openstack/patrole/patrole.py | 3 ++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/docker/patrole/Dockerfile b/docker/patrole/Dockerfile index 6d211e8fe..959e44ff1 100644 --- a/docker/patrole/Dockerfile +++ b/docker/patrole/Dockerfile @@ -31,6 +31,9 @@ RUN apk --no-cache add --virtual .build-deps --update \ mkdir -p /etc/rally && \ printf "[database]\nconnection = 'sqlite:////var/lib/rally/database/rally.sqlite'" > /etc/rally/rally.conf && \ mkdir -p /var/lib/rally/database && rally db create && \ + mkdir -p /etc/neutron /etc/glance && \ + wget -q -O /etc/neutron/policy.json https://raw.githubusercontent.com/openstack/neutron/$OPENSTACK_TAG/etc/policy.json && \ + wget -q -O /etc/glance/policy.json https://raw.githubusercontent.com/openstack/glance/$OPENSTACK_TAG/etc/policy.json && \ rm -r upper-constraints.txt /src/os-faults /src/rally && \ apk del .build-deps COPY testcases.yaml /usr/lib/python2.7/site-packages/xtesting/ci/testcases.yaml diff --git a/docker/patrole/testcases.yaml b/docker/patrole/testcases.yaml index 10edc4e5d..5615a9055 100644 --- a/docker/patrole/testcases.yaml +++ b/docker/patrole/testcases.yaml @@ -20,3 +20,5 @@ tiers: run: module: 'functest.opnfv_tests.openstack.patrole.patrole' class: 'Patrole' + args: + role: 'admin' diff --git a/functest/opnfv_tests/openstack/patrole/patrole.py b/functest/opnfv_tests/openstack/patrole/patrole.py index 226f6812d..8f30c482d 100644 --- a/functest/opnfv_tests/openstack/patrole/patrole.py +++ b/functest/opnfv_tests/openstack/patrole/patrole.py @@ -29,7 +29,8 @@ class Patrole(tempest.TempestCommon): if "case_name" not in kwargs: kwargs["case_name"] = 'patrole' super(Patrole, self).__init__(**kwargs) - self.mode = "^patrole_tempest_plugin." + 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') -- 2.16.6