Add group id for operation topic 20/138220/1
authorrameshiyer27 <ramesh.murugan.iyer@est.tech>
Thu, 13 Jun 2024 13:52:16 +0000 (13:52 +0000)
committerrameshiyer27 <ramesh.murugan.iyer@est.tech>
Thu, 13 Jun 2024 16:19:28 +0000 (16:19 +0000)
Group id added for operation topic config
Fix K8s test cases that were not invoked in clamp due to a missing env variable.

Issue-ID: POLICY-5031
Change-Id: I1b48509091717317a2e501cc1d19e4b9da69c5c8
Signed-off-by: zrrmmua <ramesh.murugan.iyer@est.tech>
20 files changed:
compose/config/clamp/A1pmsParticipantParameters.yaml
compose/config/clamp/AcRuntimeParameters.yaml
compose/config/clamp/HttpParticipantParameters.yaml
compose/config/clamp/KserveParticipantParameters.yaml
compose/config/clamp/KubernetesParticipantParameters.yaml
compose/config/clamp/PolicyParticipantParameters.yaml
compose/config/clamp/SimulatorParticipantParameters.yaml
compose/docker-compose.yml
csit/resources/Dockerfile
csit/resources/scripts/run-test.sh
csit/resources/tests/policy-clamp-test.robot
csit/run-project-csit.sh
helm/policy/components/policy-clamp-ac-a1pms-ppnt/resources/config/A1pmsParticipantParameters.yaml
helm/policy/components/policy-clamp-ac-http-ppnt/resources/config/HttpParticipantParameters.yaml
helm/policy/components/policy-clamp-ac-k8s-ppnt/resources/config/KubernetesParticipantParameters.yaml
helm/policy/components/policy-clamp-ac-kserve-ppnt/resources/config/KserveParticipantParameters.yaml
helm/policy/components/policy-clamp-ac-pf-ppnt/resources/config/PolicyParticipantParameters.yaml
helm/policy/components/policy-clamp-ac-sim-ppnt/resources/config/SimulatorParticipantParameters.yaml
helm/policy/components/policy-clamp-runtime-acm/resources/config/acRuntimeParameters.yaml
helm/robot/templates/test-job.yaml

index a3035eb..1b81a67 100755 (executable)
@@ -36,6 +36,8 @@ participant:
             - ${topicServer:kafka:9092}
           topicCommInfrastructure: kafka
           fetchTimeout: 15000
+          additionalProps:
+            group.id: policy-clamp-ac-a1pms-ppnt
 
         - topic: ${participant.intermediaryParameters.topics.syncTopic}
           servers:
index 8a5fb3f..abb5c48 100644 (file)
@@ -54,6 +54,8 @@ runtime:
         topicCommInfrastructure: kafka
         fetchTimeout: 15000
         useHttps: false
+        additionalProps:
+            group.id: policy-clamp-runtime-acm
     topicSinks:
       -
         topic: ${runtime.topics.operationTopic}
index 59644e5..6761f61 100644 (file)
@@ -26,6 +26,8 @@ participant:
           topicCommInfrastructure: kafka
           fetchTimeout: 15000
           useHttps: false
+          additionalProps:
+            group.id: policy-clamp-ac-http-ppnt
         - topic: ${participant.intermediaryParameters.topics.syncTopic}
           servers:
             - ${topicServer:kafka:9092}
index 26266dc..1865d0e 100755 (executable)
@@ -32,6 +32,8 @@ participant:
             - ${topicServer:kafka:9092}\r
           topicCommInfrastructure: kafka\r
           fetchTimeout: 15000\r
+          additionalProps:\r
+            group.id: policy-clamp-ac-kserve-ppnt\r
 \r
         - topic: ${participant.intermediaryParameters.topics.syncTopic}\r
           servers:\r
index 1597220..c85c7e5 100644 (file)
@@ -30,6 +30,8 @@ participant:
           topicCommInfrastructure: kafka
           fetchTimeout: 15000
           useHttps: false
+          additionalProps:
+            group.id: policy-clamp-ac-k8s-ppnt
         -
           topic: ${participant.intermediaryParameters.topics.syncTopic}
           servers:
index 16b258f..e510874 100644 (file)
@@ -43,6 +43,8 @@ participant:
           topicCommInfrastructure: kafka
           fetchTimeout: 15000
           useHttps: false
+          additionalProps:
+            group.id: policy-clamp-ac-pf-ppnt
         -
           topic: ${participant.intermediaryParameters.topics.syncTopic}
           servers:
index 41c30e3..ae0b0f9 100644 (file)
@@ -28,6 +28,8 @@ participant:
           topicCommInfrastructure: kafka
           fetchTimeout: 15000
           useHttps: false
+          additionalProps:
+            group.id: policy-clamp-ac-sim-ppnt
         - topic: ${participant.intermediaryParameters.topics.syncTopic}
           servers:
             - ${topicServer:kafka:9092}
index 06a2449..85631e4 100644 (file)
@@ -444,4 +444,4 @@ services:
       - /tmp/distribution:/tmp/distribution
     environment:
       ROBOT_FILE: ${ROBOT_FILES}
-      CLAMP_K8S_TEST: false
+      TEST_ENV: ${TEST_ENV}
index 786293d..b0f41b6 100644 (file)
@@ -1,7 +1,7 @@
 FROM nexus3.onap.org:10001/library/python:3.10-slim-bullseye
 ARG CSIT_SCRIPT=${CSIT_SCRIPT}
 ARG ROBOT_FILE=${ROBOT_FILE}
-ENV ROBOT_WORKSPACE=/opt/robotworkspace ROBOT_FILE=$ROBOT_FILE CLAMP_K8S_TEST=$CLAMP_K8S_TEST
+ENV ROBOT_WORKSPACE=/opt/robotworkspace ROBOT_FILE=$ROBOT_FILE TEST_ENV=$TEST_ENV
 RUN python3 -m pip -qq install --upgrade pip && \
     python3 -m pip -qq install --upgrade --extra-index-url="https://nexus3.onap.org/repository/PyPi.staging/simple" 'robotframework-onap==0.6.0.*' --pre && \
     python3 -m pip -qq install --upgrade confluent-kafka && \
index 9b01d35..fb7d30b 100755 (executable)
@@ -23,7 +23,6 @@ echo "Invoking the robot tests from: ${ROBOT_FILE}"
 DEFAULT_PORT=6969
 DATA=/opt/robotworkspace/models/models-examples/src/main/resources/policies
 NODETEMPLATES=/opt/robotworkspace/models/models-examples/src/main/resources/nodetemplates
-CLAMP_K8S_TEST=${K8S_TEST}
 
 POLICY_API_IP=policy-api:${DEFAULT_PORT}
 
@@ -64,7 +63,7 @@ ROBOT_VARIABLES="-v DATA:${DATA}
 -v DROOLS_IP_2:${DROOLS_IP_2}
 -v TEMP_FOLDER:${DIST_TEMP_FOLDER}
 -v DISTRIBUTION_IP:${DISTRIBUTION_IP}
--v CLAMP_K8S_TEST:${CLAMP_K8S_TEST}"
+-v TEST_ENV:${TEST_ENV}"
 
 export ROBOT_VARIABLES
 
index eff970a..ca7cf7d 100644 (file)
@@ -120,8 +120,7 @@ InstantiateAutomationComposition
      [Documentation]  Instantiate automation composition.
      ${auth}=    Create List    runtimeUser    zb!XztG34
      Log    Creating session http://${POLICY_RUNTIME_ACM_IP}
-     ${K8sEnabled}=    Convert To Boolean    ${CLAMP_K8S_TEST}
-     Run Keyword If    '${K8sEnabled}'=='True'    set Suite variable  ${instantiationfile}  AcK8s.json
+     Run Keyword If    '${TEST_ENV}'=='k8s'    set Suite variable  ${instantiationfile}  AcK8s.json
 
      ...    ELSE    set Suite variable  ${instantiationfile}  AcDocker.json
      ${postjson}=  Get file  ${CURDIR}/data/${instantiationfile}
index a7f7e86..678bfe2 100755 (executable)
@@ -42,10 +42,10 @@ function docker_stats(){
 
 function setup_clamp() {
     export ROBOT_FILES="policy-clamp-test.robot"
+    export TEST_ENV="docker"
     source "${WORKSPACE}"/compose/start-compose.sh policy-clamp-runtime-acm
     sleep 30
     bash "${SCRIPTS}"/wait_for_rest.sh localhost "${ACM_PORT}"
-    export CLAMP_K8S_TEST=false
 }
 
 function setup_api() {
index 1bcb387..f258948 100755 (executable)
@@ -53,6 +53,8 @@ participant:
             - "{{ .Values.global.kafkaServer }}:9092"
           topicCommInfrastructure: kafka
           fetchTimeout: 15000
+          additionalProps:
+            group.id: policy-clamp-ac-a1pms-ppnt
         - topic: ${participant.intermediaryParameters.topics.syncTopic}
           servers:
             - "{{ .Values.global.kafkaServer }}:9092"
index d500fff..9bb0d0e 100644 (file)
@@ -46,6 +46,8 @@ participant:
           topicCommInfrastructure: kafka
           fetchTimeout: 15000
           useHttps: false
+          additionalProps:
+            group.id: policy-clamp-ac-http-ppnt
         - topic: ${participant.intermediaryParameters.topics.syncTopic}
           servers:
             - "{{ .Values.global.kafkaServer }}:9092"
index 1fe2737..bd52654 100644 (file)
@@ -49,6 +49,8 @@ participant:
           topicCommInfrastructure: kafka
           fetchTimeout: 15000
           useHttps: false
+          additionalProps:
+            group.id: policy-clamp-ac-k8s-ppnt
         -
           topic: ${participant.intermediaryParameters.topics.syncTopic}
           servers:
index 50bb10a..6e854c9 100755 (executable)
@@ -52,6 +52,8 @@ participant:
             - "{{ .Values.global.kafkaServer }}:9092"
           topicCommInfrastructure: kafka
           fetchTimeout: 15000
+          additionalProps:
+            group.id: policy-clamp-ac-kserve-ppnt
         - topic: ${participant.intermediaryParameters.topics.syncTopic}
           servers:
             - "{{ .Values.global.kafkaServer }}:9092"
index 10f7df8..f7308e6 100644 (file)
@@ -65,6 +65,8 @@ participant:
           topicCommInfrastructure: kafka
           fetchTimeout: 15000
           useHttps: false
+          additionalProps:
+            group.id: policy-clamp-ac-pf-ppnt
         -
           topic: ${participant.intermediaryParameters.topics.syncTopic}
           servers:
index d13dcce..7f17820 100644 (file)
@@ -47,6 +47,8 @@ participant:
           topicCommInfrastructure: kafka
           fetchTimeout: 15000
           useHttps: false
+          additionalProps:
+            group.id: policy-clamp-ac-sim-ppnt
         - topic: ${participant.intermediaryParameters.topics.syncTopic}
           servers:
             - "{{ .Values.global.kafkaServer }}:9092"
index 84f1bc1..c33cf6b 100755 (executable)
@@ -77,6 +77,8 @@ runtime:
         topicCommInfrastructure: kafka
         useHttps: false
         fetchTimeout: 15000
+        additionalProps:
+            group.id: policy-clamp-runtime-acm
     topicSinks:
       -
         topic: ${runtime.topics.operationTopic}
index f9df6f6..a540f45 100644 (file)
@@ -50,6 +50,8 @@ spec:
           env:
             - name: ROBOT_FILE
               value: {{ .Values.robot }}
+            - name: TEST_ENV
+              value: "k8s"
           command: [ "./run-test.sh" ]
           volumeMounts:
             - name: robot-csit-pv