Add CSIT test for consolidated healthcheck 40/123740/1
authorRam Krishna Verma <ram_krishna.verma@bell.ca>
Tue, 31 Aug 2021 21:11:06 +0000 (17:11 -0400)
committerRam Krishna Verma <ram_krishna.verma@bell.ca>
Tue, 31 Aug 2021 21:11:13 +0000 (17:11 -0400)
Adding CSIT test for consolidated healthcheck.
Also, verifying the an external groups file can be mounted to replace
PapDb.json present inside the docker image for database initialization.

Issue-ID: POLICY-3609
Change-Id: Icf2585d9d9df7e820fbddfbd1fe044b5a9e29cb3
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
csit/config/pap/groups.json [new file with mode: 0644]
csit/docker-compose-all.yml
csit/pap/tests/pap-test.robot

diff --git a/csit/config/pap/groups.json b/csit/config/pap/groups.json
new file mode 100644 (file)
index 0000000..cf52fd8
--- /dev/null
@@ -0,0 +1,137 @@
+{
+  "groups": [
+    {
+      "name": "defaultGroup",
+      "version": "1.0.0",
+      "description": "The default group that registers all supported policy types and pdps.",
+      "pdpGroupState": "ACTIVE",
+      "pdpSubgroups": [
+        {
+          "pdpType": "xacml",
+          "supportedPolicyTypes": [
+            {
+              "name": "onap.policies.controlloop.guard.common.FrequencyLimiter",
+              "version": "1.0.0"
+            },
+            {
+              "name": "onap.policies.controlloop.guard.common.MinMax",
+              "version": "1.0.0"
+            },
+            {
+              "name": "onap.policies.controlloop.guard.common.Blacklist",
+              "version": "1.0.0"
+            },
+            {
+              "name": "onap.policies.controlloop.guard.common.Filter",
+              "version": "1.0.0"
+            },
+            {
+              "name": "onap.policies.controlloop.guard.coordination.FirstBlocksSecond",
+              "version": "1.0.0"
+            },
+            {
+              "name": "onap.policies.monitoring.*",
+              "version": "1.0.0"
+            },
+            {
+              "name": "onap.policies.optimization.*",
+              "version": "1.0.0"
+            },
+            {
+              "name": "onap.policies.optimization.resource.AffinityPolicy",
+              "version": "1.0.0"
+            },
+            {
+              "name": "onap.policies.optimization.resource.DistancePolicy",
+              "version": "1.0.0"
+            },
+            {
+              "name": "onap.policies.optimization.resource.HpaPolicy",
+              "version": "1.0.0"
+            },
+            {
+              "name": "onap.policies.optimization.resource.OptimizationPolicy",
+              "version": "1.0.0"
+            },
+            {
+              "name": "onap.policies.optimization.resource.PciPolicy",
+              "version": "1.0.0"
+            },
+            {
+              "name": "onap.policies.optimization.service.QueryPolicy",
+              "version": "1.0.0"
+            },
+            {
+              "name": "onap.policies.optimization.service.SubscriberPolicy",
+              "version": "1.0.0"
+            },
+            {
+              "name": "onap.policies.optimization.resource.Vim_fit",
+              "version": "1.0.0"
+            },
+            {
+              "name": "onap.policies.optimization.resource.VnfPolicy",
+              "version": "1.0.0"
+            },
+            {
+              "name": "onap.policies.native.Xacml",
+              "version": "1.0.0"
+            },
+            {
+              "name": "onap.policies.Naming",
+              "version": "1.0.0"
+            },
+            {
+              "name": "onap.policies.match.*",
+              "version": "1.0.0"
+            }
+          ],
+          "currentInstanceCount": 1,
+          "desiredInstanceCount": 1,
+          "policies": [
+            {
+              "name": "SDNC_Policy.ONAP_NF_NAMING_TIMESTAMP",
+              "version": "1.0.0"
+            }
+          ]
+        },
+        {
+          "pdpType": "drools",
+          "supportedPolicyTypes": [
+            {
+              "name": "onap.policies.controlloop.operational.common.Drools",
+              "version": "1.0.0"
+            },
+            {
+              "name": "onap.policies.native.drools.Controller",
+              "version": "1.0.0"
+            },
+            {
+              "name": "onap.policies.native.drools.Artifact",
+              "version": "1.0.0"
+            }
+          ],
+          "currentInstanceCount": 1,
+          "desiredInstanceCount": 1,
+          "policies": []
+        },
+        {
+          "pdpType": "apex",
+          "supportedPolicyTypes": [
+            {
+              "name": "onap.policies.controlloop.operational.common.Apex",
+              "version": "1.0.0"
+            },
+            {
+              "name": "onap.policies.native.Apex",
+              "version": "1.0.0"
+            }
+          ],
+          "currentInstanceCount": 1,
+          "desiredInstanceCount": 1,
+          "policies": []
+        }
+      ]
+    }
+  ]
+}
index 50b2054..c2b3af3 100644 (file)
@@ -104,6 +104,7 @@ services:
        - 6969
       volumes:
        - ./config/pap/defaultConfig.json:/opt/app/policy/pap/etc/defaultConfig.json:ro
+       - ./config/pap/groups.json:/opt/app/policy/pap/etc/mounted/groups.json:ro
        - ./config/ks.jks:/opt/app/policy/pap/etc/ssl/policy-keystore:ro
        - ./config/policy-truststore:/opt/app/policy/pap/etc/ssl/policy-truststore:ro
        - ./wait_for_port.sh:/opt/app/policy/pap/bin/wait_for_port.sh:ro
index a595914..b666eb5 100644 (file)
@@ -16,6 +16,11 @@ Healthcheck
     ${resp}=  PerformGetRequest  ${POLICY_PAP_IP}  /policy/pap/v1/healthcheck  200  null
     Should Be Equal As Strings  ${resp.json()['code']}  200
 
+Consolidated Healthcheck
+    [Documentation]  Verify policy consolidated health check
+    ${resp}=  PerformGetRequest  ${POLICY_PAP_IP}  /policy/pap/v1/components/healthcheck  200  null
+    Should Be Equal As Strings  ${resp.json()['healthy']}  True
+
 Metrics
     [Documentation]  Verify policy pap is exporting prometheus metrics
     ${resp}=  PerformGetRequest  ${POLICY_PAP_IP}  /metrics  200  null