[CPS] Create a new Python3 based robot docker for CPS 28/124428/3
authormorganrol <morgan.richomme@orange.com>
Wed, 22 Sep 2021 15:38:21 +0000 (17:38 +0200)
committermorganrol <morgan.richomme@orange.com>
Thu, 23 Sep 2021 15:26:51 +0000 (17:26 +0200)
In order to execute CPS tests in the CI, it is needed to create
a robot xtesting dockers as the existing dockers are still using
old robot libraries to match dependencies with heatbridge/selenium

A full refactoring is planned for Jakarata
This new docker could be used as a baseline

Issue-ID: CPS-654

Signed-off-by: morganrol <morgan.richomme@orange.com>
Change-Id: I49af71b1cda0cadc0837cae0f3f5b47745efff11

smoke-usecases-robot-py3/README.md [new file with mode: 0644]
smoke-usecases-robot-py3/docker/Dockerfile [new file with mode: 0644]
smoke-usecases-robot-py3/docker/testcases.yaml [new file with mode: 0644]
smoke-usecases-robot-py3/requirements.txt [new file with mode: 0644]
smoke-usecases-robot-py3/scripts/cmd.sh [new file with mode: 0755]

diff --git a/smoke-usecases-robot-py3/README.md b/smoke-usecases-robot-py3/README.md
new file mode 100644 (file)
index 0000000..e5d4652
--- /dev/null
@@ -0,0 +1,15 @@
+# Smoke use cases robot py3
+
+## Goal
+
+The tests are:
+
+- cps-healthcheck
+
+## Usage
+
+See [smoke-usecases-robot README](../smoke-usecases-robot/README.md)
+for details.
+
+This docker is behaving the same except that it is python3 with
+more recent version of robot libraries.
diff --git a/smoke-usecases-robot-py3/docker/Dockerfile b/smoke-usecases-robot-py3/docker/Dockerfile
new file mode 100644 (file)
index 0000000..1caf0f5
--- /dev/null
@@ -0,0 +1,39 @@
+FROM opnfv/xtesting:wallaby
+
+MAINTAINER Morgan Richomme <morgan.richomme@orange.com>
+
+ARG OPENSTACK_TAG=master
+ARG OPNFV_TAG=master
+ARG ONAP_TAG=master
+ARG PIP_TAG=21.2.4
+ARG KUBERNETES_VERSION="v1.19.9"
+
+ENV TAG all
+ENV CRYPTOGRAPHY_DONT_BUILD_RUST=1
+
+# Install kubectl
+# Note: Latest version may be found on:
+# https://aur.archlinux.org/packages/kubectl-bin/
+
+COPY requirements.txt requirements.txt
+RUN apk --no-cache add --update openssl && \
+    apk --no-cache add --virtual .build-deps --update \
+        python3-dev build-base linux-headers libffi-dev \
+        openssl-dev libjpeg-turbo-dev && \
+    git clone --depth 1 https://github.com/onap/cps.git -b $ONAP_TAG /cps  && \
+    find /cps -mindepth 1 -name csit -prune -o -exec rm -rf {} + && \
+    pip install --upgrade pip && \
+    pip install --no-cache-dir \
+    pip install \
+        -chttps://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=$OPENSTACK_TAG \
+        pip==$PIP_TAG && \
+    pip install \
+        -rrequirements.txt && \
+    rm -r requirements.txt && \
+    cd / && ln -s /var/opt/ONAP/robot/ /robot && \
+    apk del .build-deps
+
+COPY docker/testcases.yaml /usr/lib/python3.8/site-packages/xtesting/ci/testcases.yaml
+COPY scripts/cmd.sh /
+CMD ["/cmd.sh"]
+
diff --git a/smoke-usecases-robot-py3/docker/testcases.yaml b/smoke-usecases-robot-py3/docker/testcases.yaml
new file mode 100644 (file)
index 0000000..7ab2048
--- /dev/null
@@ -0,0 +1,164 @@
+---
+tiers:
+    -
+        name: smoke-usecases
+        order: 1
+        description: >-
+            ONAP E2E tests
+        testcases:
+            -
+                case_name: pnf-registrate
+                project_name: integration
+                enabled: true
+                criteria: 100
+                blocking: true
+                description: >-
+                    Registrate PNF
+                dependencies:
+                run:
+                    name: 'robotframework'
+                    args:
+                        suites:
+                            - /var/opt/ONAP/robot/testsuites/pnf-registration.robot
+                        include:
+                            - pnf_registrate
+                        variablefile:
+                            - '/share/config/robot_properties.py'
+            -
+                case_name: vfw-cl
+                project_name: integration
+                enabled: true
+                criteria: 100
+                blocking: true
+                description: >-
+                    vFW closed loop use case
+                dependencies:
+                run:
+                    name: 'robotframework'
+                    args:
+                        suites:
+                            - /var/opt/ONAP/robot/testsuites/vfwcl.robot
+                        include:
+                            - vfwc
+                        variablefile:
+                            - '/share/config/robot_properties.py'
+            -
+                case_name: 5gbulkpm
+                project_name: integration
+                enabled: true
+                criteria: 100
+                blocking: true
+                description: >-
+                    Test 5G Bulk PM Usecase functionality (inventory and
+                    deployment api from DCAEGEN, data router and bus
+                    controller)
+                dependencies:
+                run:
+                    name: 'robotframework'
+                    args:
+                        suites:
+                            - /var/opt/ONAP/robot/testsuites/usecases/5gbulkpm.robot
+                        include:
+                            - 5gbulkpm
+                        variablefile:
+                            - '/share/config/robot_properties.py'
+            -
+                case_name: hv-ves
+                project_name: integration
+                enabled: true
+                criteria: 100
+                blocking: true
+                description: >-
+                    HV VES (High Volume) VES collector has been proposed, based
+                    on a need to process high-volumes of data generated
+                    frequently by a large number of NFs. The driving use-case
+                    is the 5G RAN, where it is expected that up to 10k NF
+                    instances report the data, per DCAE platform deployment.
+                    The network traffic generated in simulations - based on
+                    4G BTS Real-Time PM data has shown, that GPB serialization
+                    is 2-3 times more effective, than JSON serialization
+                    utilized in VES collector. HV-VES 'Sunny Scenario' Robot
+                    Framework test - message is sent to the collector and Kafka
+                    topic is checked if the message has been published. Content
+                    is decoded and checked.
+                dependencies:
+                run:
+                    name: 'robotframework'
+                    args:
+                        suites:
+                            - /var/opt/ONAP/robot/testsuites/hvves-ci.robot
+                        include:
+                            - hvves
+                        variablefile:
+                            - '/share/config/robot_properties.py'
+            -
+                case_name: ves-collector
+                project_name: integration
+                enabled: true
+                criteria: 100
+                blocking: true
+                description: >-
+                    Suite for checking handling events by VES Collector
+                dependencies:
+                run:
+                    name: 'robotframework'
+                    args:
+                        suites:
+                            - /var/opt/ONAP/robot/testsuites/ves.robot
+                        include:
+                            - vescollector
+                        variablefile:
+                            - '/share/config/robot_properties.py'
+            -
+                case_name: cmpv2
+                project_name: integration
+                enabled: true
+                criteria: 100
+                blocking: true
+                description: >-
+                    Suite for checking CMPv2 Usecase functionality
+                dependencies:
+                run:
+                    name: 'robotframework'
+                    args:
+                        suites:
+                            - /var/opt/ONAP/robot/testsuites/cmpv2.robot
+                        include:
+                            - CMPv2
+                        variablefile:
+                            - '/share/config/robot_properties.py'
+            -
+                case_name: dcaemod
+                project_name: integration
+                enabled: true
+                criteria: 100
+                blocking: true
+                description: >-
+                    Suite for checking DCAEMOD functionality including Generic mechanism to attach
+                    K8S ConfigMaps to DCAE apps
+                dependencies:
+                run:
+                    name: 'robotframework'
+                    args:
+                        suites:
+                            - /var/opt/ONAP/robot/testsuites/dcaemod.robot
+                        include:
+                            - dcaemod
+                        variablefile:
+                            - '/share/config/robot_properties.py'
+            -
+                case_name: cps-healthcheck
+                project_name: integration
+                enabled: true
+                criteria: 100
+                blocking: true
+                description: >-
+                    Execute CPS healtcheck
+                dependencies:
+                run:
+                    name: 'robotframework'
+                    args:
+                        suites:
+                            - /cps/csit/tests/actuator/actuator.robot
+                        variablefile:
+                            - '/share/config/robot_properties.py'
diff --git a/smoke-usecases-robot-py3/requirements.txt b/smoke-usecases-robot-py3/requirements.txt
new file mode 100644 (file)
index 0000000..49d7511
--- /dev/null
@@ -0,0 +1,2 @@
+robotframework==3.1.1
+robotframework-requests>=0.8
diff --git a/smoke-usecases-robot-py3/scripts/cmd.sh b/smoke-usecases-robot-py3/scripts/cmd.sh
new file mode 100755 (executable)
index 0000000..aeeffde
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+run_tests -t ${TAG} -r || true