Add patrole in opnfv/functest-restapi 53/53453/1
authorCédric Ollivier <cedric.ollivier@orange.com>
Sat, 10 Mar 2018 13:35:53 +0000 (14:35 +0100)
committerCédric Ollivier <cedric.ollivier@orange.com>
Sat, 10 Mar 2018 13:35:53 +0000 (14:35 +0100)
Change-Id: I983898c27477986d9a5610e1df966fd00a8bc785
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
docker/patrole/testcases.yaml
docker/restapi/Dockerfile
functest/ci/testcases.yaml

index 5d9199c..4d4b4c6 100644 (file)
@@ -15,7 +15,7 @@ tiers:
                 description: >-
                     Test suite from Patrole project.
                 dependencies:
-                    installer: '^((?!netvirt).)*$'
+                    installer: ''
                     scenario: ''
                 run:
                     module: 'functest.opnfv_tests.openstack.patrole.patrole'
index 6dffce1..d4074be 100644 (file)
@@ -9,6 +9,7 @@ ARG REFSTACK_TAG=a59189eaacda24b787ecb65e6634257beba361ec
 ARG REFSTACK_TARGET=2017.09
 ARG FDS_TAG=master
 ARG VIMS_TAG=stable
+ARG PATROLE_TAG=0.2.0
 
 COPY thirdparty-requirements.txt thirdparty-requirements.txt
 RUN apk --no-cache add --update python3 sshpass \
@@ -31,12 +32,15 @@ RUN apk --no-cache add --update python3 sshpass \
     git clone https://github.com/openstack/refstack-client.git /src/refstack-client && \
     (cd /src/refstack-client && git checkout $REFSTACK_TAG) && \
     update-requirements -s --source /src/openstack-requirements /src/refstack-client/ && \
+    git clone https://github.com/openstack/patrole.git /src/patrole && \
+    (cd /src/patrole && git checkout $PATROLE_TAG) && \
+    update-requirements -s --source /src/openstack-requirements /src/patrole/ && \
     pip install --no-cache-dir --src /src -cupper-constraints.txt \
         -chttps://git.opnfv.org/functest/plain/upper-constraints.txt?h=$BRANCH \
         tempest /src/os-faults && \
     pip install --no-cache-dir --src /src -cupper-constraints.txt \
         -chttps://git.opnfv.org/functest/plain/upper-constraints.txt?h=$BRANCH \
-        -e/src/refstack-client /src/rally -rthirdparty-requirements.txt && \
+        -e/src/refstack-client oslotest /src/patrole /src/rally -rthirdparty-requirements.txt && \
     python3 -m pip install --no-cache-dir --src /src -cupper-constraints.txt \
         -chttps://git.opnfv.org/functest/plain/upper-constraints.txt?h=$BRANCH \
         doctor-tests && \
@@ -52,15 +56,18 @@ RUN apk --no-cache add --update python3 sshpass \
         juju-wait && \
     go get github.com/rogpeppe/godeps && \
     (cd /src/vims-test && bundle config build.nokogiri --use-system-libraries && bundle install --system) && \
-    rm -r upper-constraints.txt thirdparty-requirements.txt /src/refstack-client/.git /src/odl_test/.git \
-        /src/os-faults /src/rally /src/fds/.git /src/vims-test/.git /src/epc-requirements/abot_charm/.git && \
     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 /home/opnfv/functest/data/refstack && \
     wget "https://refstack.openstack.org/api/v1/guidelines/${REFSTACK_TARGET}/tests?target=compute&type=required&alias=true&flag=false" \
         -O /home/opnfv/functest/data/refstack/defcore.txt && \
+    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 && \
     cp /usr/lib/python2.7/site-packages/functest/ci/testcases.yaml /usr/lib/python2.7/site-packages/xtesting/ci && \
+    rm -r upper-constraints.txt thirdparty-requirements.txt /src/refstack-client/.git /src/odl_test/.git \
+        /src/os-faults /src/rally /src/fds/.git /src/vims-test/.git /src/epc-requirements/abot_charm/.git && \
     apk del .build-deps
 EXPOSE 5000
 CMD ["functest_restapi"]
index b07566b..ce1823a 100644 (file)
@@ -149,6 +149,28 @@ tiers:
                         'functest.opnfv_tests.openstack.refstack_client.refstack_client'
                     class: 'RefstackClient'
 
+            -
+                case_name: patrole
+                project_name: functest
+                criteria: 100
+                blocking: true
+                description: >-
+                    Test suite from Patrole project.
+                dependencies:
+                    installer: ''
+                    scenario: ''
+                run:
+                    module: 'functest.opnfv_tests.openstack.patrole.patrole'
+                    class: 'Patrole'
+                    args:
+                        role: 'admin'
+                        services:
+                            - 'image'
+                            - 'network'
+                            - 'volume'
+                        exclude:
+                            - 'test_networks_multiprovider_rbac'
+
             -
                 case_name: odl
                 project_name: functest