[PMSH] Refactoring changes for pmsh csits 85/111185/1
authorefiacor <fiachra.corcoran@est.tech>
Wed, 12 Aug 2020 13:50:54 +0000 (14:50 +0100)
committerefiacor <fiachra.corcoran@est.tech>
Wed, 12 Aug 2020 13:51:06 +0000 (14:51 +0100)
Signed-off-by: efiacor <fiachra.corcoran@est.tech>
Change-Id: I6902b40e9618e0e1e67c4c2d2b8a3f45c585d46b
Issue-ID: DCAEGEN2-2146

plans/dcaegen2-services-pmsh/testsuite/assets/mr_sim/mr-initializer.json
tests/dcaegen2-services-pmsh/testcases/assets/cbs-expectation-unlocked-config.json
tests/dcaegen2-services-pmsh/testcases/assets/mr-expectation-aai-pnf-created.json
tests/dcaegen2-services-pmsh/testcases/assets/mr-expectation-aai-pnf-deleted.json
tests/dcaegen2-services-pmsh/testcases/assets/mr-expectation-policy-subscription-created-pnf-existing.json
tests/dcaegen2-services-pmsh/testcases/assets/mr-expectation-policy-subscription-created-pnf-new.json [deleted file]
tests/dcaegen2-services-pmsh/testcases/pmsh.robot

index 6b12a83..6c2c480 100644 (file)
@@ -1,7 +1,7 @@
 [
   {
     "httpRequest": {
-      "path": "/events/AAI_EVENT/dcae_pmsh_cg/dcae_pmsh_aai_event",
+      "path": "/events/AAI_EVENT/.*",
       "queryStringParameters" : {
         "timeout" : [ "1000" ]
       }
@@ -13,7 +13,7 @@
           "application/json"
         ]
       },
-      "body": "{}"
+      "body": []
     }
   },
   {
           "application/json"
         ]
       },
-      "body": {
-        "type": "JSON",
-        "json": {}
-      }
+      "body": []
     }
   },
   {
     "httpRequest": {
-      "path": "/events/unauthenticated.PMSH_CL_INPUT/dcae_pmsh_cg/dcae_pmsh_policy_cl_input",
+      "path": "/events/unauthenticated.PMSH_CL_INPUT/.*",
       "queryStringParameters" : {
         "timeout" : [ "1000" ]
       }
           "application/json"
         ]
       },
-      "body": {
-        "type": "JSON",
-        "json": {}
-      }
+      "body": []
     }
   }
 ]
index b70b41d..bad79d5 100644 (file)
@@ -84,7 +84,7 @@
                 "dmaap_info": {
                   "client_id": "1475976809466",
                   "client_role": "org.onap.dcae.pmPublisher",
-                  "topic_url": "https://mr-sim:3095/events/org.onap.dmaap.mr.PM_SUBSCRIPTIONS",
+                  "topic_url": "https://mr-sim:3095/events/unauthenticated.DCAE_CL_OUTPUT",
                   "location": "san-francisco"
                 },
                 "type": "message_router"
               "policy_pm_subscriber": {
                 "dmaap_info": {
                   "location": "san-francisco",
-                  "topic_url": "https://mr-sim:3095/events/org.onap.dmaap.mr.PM_SUBSCRIPTIONS",
+                  "topic_url": "https://mr-sim:3095/events/unauthenticated.PMSH_CL_INPUT",
                   "client_role": "org.onap.dcae.pmSubscriber",
                   "client_id": "1575876809456"
                 },
index 1a027f2..860672f 100644 (file)
@@ -1,7 +1,7 @@
 [
   {
     "httpRequest": {
-      "path": "/events/AAI_EVENT/dcae_pmsh_cg/dcae_pmsh_aai_event",
+      "path": "/events/AAI_EVENT/.*",
       "queryStringParameters" : {
         "timeout" : [ "1000" ]
       }
@@ -24,7 +24,7 @@
   },
   {
     "httpRequest": {
-      "path": "/events/AAI_EVENT/dcae_pmsh_cg/dcae_pmsh_aai_event",
+      "path": "/events/AAI_EVENT/.*",
       "queryStringParameters" : {
         "timeout" : [ "1000" ]
       }
@@ -36,7 +36,7 @@
           "application/json"
         ]
       },
-      "body": "{}"
+      "body": []
     }
   }
 ]
index e5c4dd8..8dd5818 100644 (file)
@@ -1,7 +1,7 @@
 [
   {
     "httpRequest": {
-      "path": "/events/AAI_EVENT/dcae_pmsh_cg/dcae_pmsh_aai_event",
+      "path": "/events/AAI_EVENT/.*",
       "queryStringParameters" : {
         "timeout" : [ "1000" ]
       }
@@ -24,7 +24,7 @@
   },
   {
     "httpRequest": {
-      "path": "/events/AAI_EVENT/dcae_pmsh_cg/dcae_pmsh_aai_event",
+      "path": "/events/AAI_EVENT/.*",
       "queryStringParameters" : {
         "timeout" : [ "1000" ]
       }
@@ -36,7 +36,7 @@
           "application/json"
         ]
       },
-      "body": "{}"
+      "body": []
     }
   }
 ]
index eba4e4e..cd75deb 100644 (file)
@@ -1,7 +1,7 @@
 [
   {
     "httpRequest": {
-      "path": "/events/unauthenticated.PMSH_CL_INPUT/dcae_pmsh_cg/dcae_pmsh_policy_cl_input",
+      "path": "/events/unauthenticated.PMSH_CL_INPUT/.*",
       "queryStringParameters" : {
         "timeout" : [ "1000" ]
       }
@@ -24,7 +24,7 @@
   },
   {
     "httpRequest": {
-      "path": "/events/unauthenticated.PMSH_CL_INPUT/dcae_pmsh_cg/dcae_pmsh_policy_cl_input",
+      "path": "/events/unauthenticated.PMSH_CL_INPUT/.*",
       "queryStringParameters" : {
         "timeout" : [ "1000" ]
       }
           "application/json"
         ]
       },
-      "body": {
-        "type": "JSON",
-        "json": {}
-      }
+      "body": []
     }
   }
 ]
diff --git a/tests/dcaegen2-services-pmsh/testcases/assets/mr-expectation-policy-subscription-created-pnf-new.json b/tests/dcaegen2-services-pmsh/testcases/assets/mr-expectation-policy-subscription-created-pnf-new.json
deleted file mode 100644 (file)
index f73fee8..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-[
-  {
-    "httpRequest": {
-      "path": "/events/unauthenticated.PMSH_CL_INPUT/dcae_pmsh_cg/dcae_pmsh_policy_cl_input",
-      "queryStringParameters" : {
-        "timeout" : [ "1000" ]
-      }
-    },
-    "httpResponse": {
-      "statusCode": 200,
-      "headers": {
-        "content-type": [
-          "application/json"
-        ]
-      },
-      "body": [
-        "{\"name\": \"ResponseEvent\", \"nameSpace\": \"org.onap.policy.apex.onap.pmcontrol\", \"source\": \"APEX\", \"target\": \"DCAE\", \"version\": \"0.0.1\", \"status\": {\"subscriptionName\": \"ExtraPM-All-gNB-R2B\", \"nfName\": \"pnf_new\", \"changeType\": \"CREATE\", \"message\": \"success\"}}"
-      ]
-    },
-    "times": {
-      "remainingTimes": 1,
-      "unlimited": false
-    }
-  },
-  {
-    "httpRequest": {
-      "path": "/events/unauthenticated.PMSH_CL_INPUT/dcae_pmsh_cg/dcae_pmsh_policy_cl_input",
-      "queryStringParameters" : {
-        "timeout" : [ "1000" ]
-      }
-    },
-    "httpResponse": {
-      "statusCode": 200,
-      "headers": {
-        "content-type": [
-          "application/json"
-        ]
-      },
-      "body": {
-        "type": "JSON",
-        "json": {}
-      }
-    }
-  }
-]
index a2b8cad..def53ca 100644 (file)
@@ -21,7 +21,6 @@ ${SUBSCRIPTIONS_ENDPOINT}           /subscriptions
 
 ${MR_EXPECTATION_AAI_PNF_CREATED}               %{WORKSPACE}/tests/dcaegen2-services-pmsh/testcases/assets/mr-expectation-aai-pnf-created.json
 ${MR_EXPECTATION_AAI_PNF_REMOVED}               %{WORKSPACE}/tests/dcaegen2-services-pmsh/testcases/assets/mr-expectation-aai-pnf-deleted.json
-${MR_EXPECTATION_POLICY_RESPONSE_PNF_NEW}       %{WORKSPACE}/tests/dcaegen2-services-pmsh/testcases/assets/mr-expectation-policy-subscription-created-pnf-new.json
 ${MR_EXPECTATION_POLICY_RESPONSE_PNF_EXISTING}  %{WORKSPACE}/tests/dcaegen2-services-pmsh/testcases/assets/mr-expectation-policy-subscription-created-pnf-existing.json
 ${CBS_EXPECTATION_ADMIN_STATE_UNLOCKED}         %{WORKSPACE}/tests/dcaegen2-services-pmsh/testcases/assets/cbs-expectation-unlocked-config.json
 
@@ -62,18 +61,18 @@ Verify PNF detected in AAI when administrative state unlocked
 Verify Policy response on MR is handled
     [Tags]                          PMSH_04
     [Documentation]                 Verify policy response on MR is handled
-    [Timeout]                       40 seconds
+    [Timeout]                       60 seconds
     SimulatePolicyResponse          ${MR_EXPECTATION_POLICY_RESPONSE_PNF_EXISTING}
-    Sleep                           15 seconds      Ensure Policy response on MR is picked up
+    Sleep                           31 seconds      Ensure Policy response on MR is picked up
     ${resp}=                        Get Request                      pmsh_session  ${SUBSCRIPTIONS_ENDPOINT}
     Should Be Equal As Strings      ${resp.json()[0]['network_functions'][0]['nf_sub_status']}     CREATED
 
 Verify AAI event on MR detailing new PNF being detected is handled
     [Tags]                          PMSH_05
     [Documentation]                 Verify PNF created AAI event on MR is handled
-    [Timeout]                       30 seconds
+    [Timeout]                       60 seconds
     SimulateNewPNF
-    Sleep                           15 seconds      Ensure AAI event on MR is picked up
+    Sleep                           31 seconds      Ensure AAI event on MR is picked up
     ${resp}=                        Get Request                      pmsh_session  ${SUBSCRIPTIONS_ENDPOINT}
     Should Be Equal As Strings      ${resp.json()[0]['network_functions'][1]['nf_name']}            pnf_newly_discovered
     Should Be Equal As Strings      ${resp.json()[0]['network_functions'][1]['orchestration_status']}   Active
@@ -82,9 +81,9 @@ Verify AAI event on MR detailing new PNF being detected is handled
 Verify AAI event on MR detailing PNF being deleted is handled
     [Tags]                          PMSH_06
     [Documentation]                 Verify PNF deleted AAI event on MR is handled
-    [Timeout]                       30 seconds
+    [Timeout]                       60 seconds
     SimulateDeletedPNF
-    Sleep                           12 seconds      Ensure AAI event on MR is picked up
+    Sleep                           31 seconds      Ensure AAI event on MR is picked up
     ${resp}=                        Get Request                      pmsh_session  ${SUBSCRIPTIONS_ENDPOINT}
     Should Not Contain              ${resp.text}            pnf_newly_discovered