Resync manually xtesting repo from gitlab.com repo 01/109401/2
authormrichomme <morgan.richomme@orange.com>
Mon, 22 Jun 2020 09:49:46 +0000 (11:49 +0200)
committermrichomme <morgan.richomme@orange.com>
Mon, 22 Jun 2020 12:18:06 +0000 (14:18 +0200)
The goal is to use xtesting once we shall be able to build
all the dockers properly

Issue-ID: INT-1366

Signed-off-by: mrichomme <morgan.richomme@orange.com>
Change-Id: I068eb6019f6eec04b46b545222cbb5cecb265234
Signed-off-by: mrichomme <morgan.richomme@orange.com>
LICENSE
README.md
infra-healthcheck/docker/Dockerfile
infra-healthcheck/infra_healthcheck/k8stest.py
security/scripts/check_security_root.sh
security/scripts/root_pods_xfail.txt
smoke-usecases-robot/README.md
smoke-usecases-robot/docker/Dockerfile
smoke-usecases-robot/docker/testcases.yaml
smoke-usecases-robot/requirements.txt

diff --git a/LICENSE b/LICENSE
index 9a47057..395c3d1 100644 (file)
--- a/LICENSE
+++ b/LICENSE
 ---
 
 All Documentation content that resides under the doc/ directory of this
-repository is licensed under Creative Commons: CC-BY-4.0.
+repository is licensed under Creative Commons: CC BY-SA 4.0.
index 3d6ddb4..ff9b1aa 100644 (file)
--- a/README.md
+++ b/README.md
@@ -1,5 +1,6 @@
-# Integration Xtesting
+# Xtesting
 
 Project used to build ONAP integration xtesting dockers
 This project contains the definition of the integration dockers, their
 associated testcases.
+Thanks to jenkinsss, the dockers are built and hosted in the nexus3
index 07b417b..87d177c 100644 (file)
@@ -1,7 +1,7 @@
 FROM opnfv/xtesting
 
-ARG KUBERNETES_VERSION="v1.15.2"
-ARG HELM_VERSION="v2.14.1"
+ARG KUBERNETES_VERSION="v1.15.11"
+ARG HELM_VERSION="v2.16.6"
 ARG ONAP_TESTS_TAG=master
 ARG ONAP_TAG=master
 
index f8d618f..da1d764 100644 (file)
@@ -57,10 +57,13 @@ class K8sTesting(testcase.TestCase):
         details = {}
         lines = output.split('\n')
         success = False
+        str_remarks = ""
 
         for log in lines:
             if log.startswith(">>>"):
                 remarks.append(log.replace('>', ''))
+            else:
+                remarks.append(log)
         for remark in remarks:
             if ':' in remark:
                 # 2 possible Results
@@ -78,6 +81,8 @@ class K8sTesting(testcase.TestCase):
         # if 1 pod/helm chart if Failed, the testcase is failed
         if int(details[self.criteria_string]) < 1:
             success = True
+        elif("failed" not in str_remarks.join(remarks).lower()):
+            success = True
 
         self.details = details
         self.__logger.info("details: %s", details)
@@ -119,4 +124,4 @@ class OnapSecurityNodePortsIngress(K8sTesting):
         super(OnapSecurityNodePortsIngress, self).__init__(**kwargs)
         self.cmd = ['python3', '/check_for_ingress_and_nodeports.py',
                     '--conf', '/root/.kube/config']
-        self.error_string = "NodePort without corresponding Ingress found"
+        self.criteria_string = "NodePort without corresponding Ingress found"
index ca388fd..5dd40f8 100644 (file)
@@ -60,6 +60,10 @@ while IFS= read -r line; do
        # Found in white list, exclude it
        sed -i "/$line/d" $FILTERED_PODS_LIST
    fi
+   # tmp ugly workaround to exlude dep (temporary dcae dockers)
+   if grep -e dep-$wl_name <<< "$line" > /dev/null ;then
+       sed -i "/$line/d" $FILTERED_PODS_LIST
+   fi
   done < $WL_RAW_FILE_PATH
 done < $FILTERED_PODS_LIST
 
index c282cf8..8623b57 100644 (file)
@@ -10,6 +10,7 @@ consul # nobody remembers who is responsible for consul
 dcae-redis # redis container
 dcae-mongo # mongo container
 dcae-cloudify-manager # DCAEGEN2-2121
+dcae-tca-analytics # tmp tca will be replaced by secured tca2 in G
 mariadb # common mariadb
 msb-consul # another consul
 multicloud-fcaps # rabbit-mq upstream pod MULTICLOUD-1017
index 9578084..74b36f3 100644 (file)
@@ -4,13 +4,89 @@
 
 The tests are:
 
-* pnf_registrate
-* vfw_cl
+- pnf_registrate
+- vfw_cl
+- 5gbulkpm
+- hv-ves
 
 ## Usage
 
+The robot scripts have been planned to be launched from the cluster.
+The easiest way to run the test consists in creating a kubernetes job.
+You can run it as a sandalone dockers but the endpoints must be adapted
+to be reachable.
+
 ### Configuration
 
+An example of job test.yaml can be found hereafter:
+
+```
+apiVersion: batch/v1
+kind: Job
+metadata:
+    name: integration-onap-5gbulkpm
+    namespace: onap
+spec:
+    template:
+        spec:
+            containers:
+            -   env:
+                -   name: INSTALLER_TYPE
+                    value: oom
+                -   name: DEPLOY_SCENARIO
+                    value: onap-nofeature-noha
+                -   name: NODE_NAME
+                    value: onap_daily_pod4_frankfurt-ONAP-oom
+                -   name: TEST_DB_URL
+                    value: http://testresults.opnfv.org/onap/api/v1/results
+                -   name: BUILD_TAG
+                    value: gitlab_ci-functest-kubespray-baremetal-daily-master-559950989
+                -   name: TAG
+                    value: 5gbulkpm
+                image: registry.gitlab.com/orange-opensource/lfn/onap/integration/xtesting/smoke-usecases-robot:latest
+                imagePullPolicy: Always
+                name: functest-onap
+                volumeMounts:
+                -   mountPath: /etc/localtime
+                    name: localtime
+                    readOnly: true
+                -   mountPath: /share/config
+                    name: robot-eteshare
+                -   mountPath: /var/lib/xtesting/results/
+                    name: robot-save-results
+            restartPolicy: Never
+            volumes:
+            -   hostPath:
+                    path: /etc/localtime
+                name: localtime
+            -   configMap:
+                    defaultMode: 493
+                    name: onap-robot-eteshare-configmap
+                name: robot-eteshare
+            -   hostPath:
+                    path: /dockerdata-nfs/onap/integration/smoke-usecases-robot/5gbulkpm
+                name: robot-save-results
+```
+
+In the example, we want to run the 5gbulkpm test.
+
 ### Command
 
+To run the job, just type:
+
+```
+  kubectl apply -f test.yaml
+```
+
 ### Output
+
+This job shall create an euphemeral pod.
+The results will be available in the mounter volume and shall contains 3 files in
+this case:
+
+- xtesting.log
+- report.html
+- log.html
+
+More generally, it shall contain the xtesting.log + all the artifacts generated by
+the test.
index 8dbe29a..5a614c0 100644 (file)
@@ -5,15 +5,23 @@ MAINTAINER Morgan Richomme <morgan.richomme@orange.com>
 ARG OPENSTACK_TAG=master
 ARG OPNFV_TAG=master
 ARG ONAP_TAG=master
-ARG PIP_TAG=19.3.1
+ARG PIP_TAG=20.1
+ARG KUBERNETES_VERSION="v1.15.11"
 
 ENV TAG all
 
+# Install kubectl
+# Note: Latest version may be found on:
+# https://aur.archlinux.org/packages/kubectl-bin/
+
+ADD https://storage.googleapis.com/kubernetes-release/release/${KUBERNETES_VERSION}/bin/linux/amd64/kubectl /usr/local/bin/kubectl
+
 COPY requirements.txt requirements.txt
 RUN apk --no-cache add --update openssl chromium chromium-chromedriver && \
     apk --no-cache add --virtual .build-deps --update \
         python3-dev build-base linux-headers libffi-dev \
         openssl-dev libjpeg-turbo-dev && \
+    chmod +x /usr/local/bin/kubectl && \
     pip3 install --upgrade pip && \
     pip3 install --no-cache-dir \
     git+https://git.onap.org/testsuite/heatbridge.git@$ONAP_TAG#egg=heatbridge\&subdirectory=heatbridge  \
@@ -30,6 +38,8 @@ RUN apk --no-cache add --update openssl chromium chromium-chromedriver && \
     mkdir -p /var/opt/ONAP/demo/tosca && cp -Rf /src/demo/tosca/pNF /var/opt/ONAP/demo/tosca/ && \
     mkdir -p /demo/service_mapping && cp -Rf /src/demo/service_mapping /demo/ && \
     mkdir -p /var/opt/ONAP/demo/preload_data && cp -Rf /src/demo/preload_data /var/opt/ONAP/demo/ && \
+    mkdir -p /app && cp /var/opt/ONAP/setup-hvves.sh /app/setup-hvves.sh && \
+    chmod +x /app/setup-hvves.sh && \
     ln -s /usr/lib/python3.7/site-packages/vcpeutils /usr/lib/python3.7/site-packages/SoUtils && \
     ln -s /usr/lib/python3.7/site-packages/heatbridge /usr/lib/python3.7/site-packages/HeatBridge && \
     rm -r requirements.txt /var/opt/ONAP/.git /src/demo && \
index 969c9b7..9036d24 100644 (file)
@@ -42,3 +42,52 @@ tiers:
                             - 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'
index 34e61d8..4274f19 100644 (file)
@@ -9,6 +9,7 @@ robotframework-selenium2library
 robotframework-databaselibrary
 robotframework-extendedselenium2library
 robotframework-requests
+robotframework-jsonlibrary
 deepdiff
 dnspython
 pyyaml>=4.2b1