Fix related to name and statistics changes in CSIT 78/122378/1
authora.sreekumar <ajith.sreekumar@bell.ca>
Wed, 30 Jun 2021 15:46:00 +0000 (16:46 +0100)
committera.sreekumar <ajith.sreekumar@bell.ca>
Wed, 30 Jun 2021 15:46:06 +0000 (16:46 +0100)
Change-Id: Iaeaadca083431a8b8df8043f73146fb31a09f3e0
Issue-ID: POLICY-3410
Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
csit/apex-pdp/tests/apex-pdp-test.robot
csit/config/pap/defaultConfig.json

index e538e6f..62a01b9 100644 (file)
@@ -16,6 +16,7 @@ Healthcheck
      Log    Received response from policy ${resp.text}
      Should Be Equal As Strings    ${resp.status_code}     200
      Should Be Equal As Strings    ${resp.json()['code']}  200
+     Set Suite Variable    ${pdpName}    ${resp.json()['name']}
 
 ExecuteApexPolicy
      Wait Until Keyword Succeeds    2 min    5 sec    CreatePolicy
@@ -62,7 +63,7 @@ VerifyPolicyStatus
      Should Be Equal As Strings    ${resp.status_code}     200
      Should Be Equal As Strings    ${resp.json()[0]['pdpGroup']}  defaultGroup
      Should Be Equal As Strings    ${resp.json()[0]['pdpType']}  apex
-     Should Be Equal As Strings    ${resp.json()[0]['pdpId']}  policy-apex-pdp
+     Should Be Equal As Strings    ${resp.json()[0]['pdpId']}  ${pdpName}
      Should Be Equal As Strings    ${resp.json()[0]['policy']['name']}  onap.policies.native.apex.Sampledomain
      Should Be Equal As Strings    ${resp.json()[0]['policy']['version']}  1.0.0
      Should Be Equal As Strings    ${resp.json()[0]['policyType']['name']}  onap.policies.native.Apex
@@ -85,10 +86,10 @@ VerifyPdpStatistics
      Log    Creating session https://${POLICY_PAP_IP}:6969
      ${session}=    Create Session      policy  https://${POLICY_PAP_IP}:6969   auth=${auth}
      ${headers}=  Create Dictionary     Accept=application/json    Content-Type=application/json
-     ${resp}=    GET On Session    policy    /policy/pap/v1/pdps/statistics/defaultGroup/apex/policy-apex-pdp    params=recordCount=1    headers=${headers}
+     ${resp}=    GET On Session    policy    /policy/pap/v1/pdps/statistics/defaultGroup/apex/${pdpName}    params=recordCount=1    headers=${headers}
      Log    Received response from policy ${resp.text}
      Should Be Equal As Strings    ${resp.status_code}     200
-     Should Be Equal As Strings    ${resp.json()['defaultGroup']['apex'][0]['pdpInstanceId']}  policy-apex-pdp
+     Should Be Equal As Strings    ${resp.json()['defaultGroup']['apex'][0]['pdpInstanceId']}  ${pdpName}
      Should Be Equal As Strings    ${resp.json()['defaultGroup']['apex'][0]['pdpGroupName']}  defaultGroup
      Should Be Equal As Strings    ${resp.json()['defaultGroup']['apex'][0]['pdpSubGroupName']}  apex
      Should Be Equal As Strings    ${resp.json()['defaultGroup']['apex'][0]['policyDeployCount']}  ${deployCount}
index 51a4c04..15bba3f 100644 (file)
@@ -28,6 +28,7 @@
         "databasePassword": "policy_user",
         "persistenceUnit": "PolicyMariaDb"
     },
+    "savePdpStatisticsInDb": true,
     "topicParameterGroup": {
         "topicSources" : [{
             "topic" : "POLICY-PDP-PAP",