Expand PMSH CSIT tests

Issue-ID: DCAEGEN2-1842
Signed-off-by: AndyWalshe <andy.walshe@est.tech>
Change-Id: Icc851f6606242350456c297220a13a806d5e0d95
diff --git a/tests/dcaegen2-services-pmsh/testcases/assets/cbs-expectation-unlocked-config.json b/tests/dcaegen2-services-pmsh/testcases/assets/cbs-expectation-unlocked-config.json
new file mode 100644
index 0000000..6f6972f
--- /dev/null
+++ b/tests/dcaegen2-services-pmsh/testcases/assets/cbs-expectation-unlocked-config.json
@@ -0,0 +1,119 @@
+[
+  {
+    "httpRequest": {
+      "path": "/service_component_all/.*"
+    },
+    "httpResponse": {
+      "statusCode": 200,
+      "headers": {
+        "content-type": [
+          "application/json"
+        ]
+      },
+      "body": {
+        "type": "JSON",
+        "json": {
+          "policy": {
+            "subscription": {
+              "subscriptionName": "ExtraPM-All-gNB-R2B",
+              "administrativeState": "UNLOCKED",
+              "fileBasedGP": 15,
+              "fileLocation": "/pm/pm.xml",
+              "nfFilter": {
+                "swVersions": [
+                  "1.0.0",
+                  "1.0.1"
+                ],
+                "nfNames": [
+                  "^pnf.*",
+                  "^vnf.*"
+                ]
+              },
+              "measurementGroups": [
+                {
+                  "measurementGroup": {
+                    "measurementTypes": [
+                      {
+                        "measurementType": "countera"
+                      },
+                      {
+                        "measurementType": "counterb"
+                      }
+                    ],
+                    "managedObjectDNsBasic": [
+                      {
+                        "DN": "dna"
+                      },
+                      {
+                        "DN": "dnb"
+                      }
+                    ]
+                  }
+                },
+                {
+                  "measurementGroup": {
+                    "measurementTypes": [
+                      {
+                        "measurementType": "counterc"
+                      },
+                      {
+                        "measurementType": "counterd"
+                      }
+                    ],
+                    "managedObjectDNsBasic": [
+                      {
+                        "DN": "dnc"
+                      },
+                      {
+                        "DN": "dnd"
+                      }
+                    ]
+                  }
+                }
+              ]
+            }
+          },
+          "config": {
+            "control_loop_name": "pmsh-control-loop",
+            "operational_policy_name": "pmsh-operational-policy",
+            "cert_path": "/opt/app/pmsh/etc/certs/cert.pem",
+            "streams_publishes": {
+              "policy_pm_publisher": {
+                "dmaap_info": {
+                  "client_id": "1475976809466",
+                  "client_role": "org.onap.dcae.pmPublisher",
+                  "topic_url": "https://mr-sim:1080/events/org.onap.dmaap.mr.PM_SUBSCRIPTIONS",
+                  "location": "san-francisco"
+                },
+                "type": "message_router"
+              }
+            },
+            "streams_subscribes": {
+              "aai_subscriber": {
+                "type": "message_router",
+                "dmaap_info": {
+                  "client_id": "1575976809466",
+                  "client_role": "org.onap.dcae.aaiSub",
+                  "topic_url": "https://mr-sim:1080/events/AAI_EVENT",
+                  "location": "san-francisco"
+                }
+              },
+              "policy_pm_subscriber": {
+                "dmaap_info": {
+                  "location": "san-francisco",
+                  "topic_url": "https://mr-sim:1080/events/org.onap.dmaap.mr.PM_SUBSCRIPTIONS",
+                  "client_role": "org.onap.dcae.pmSubscriber",
+                  "client_id": "1575876809456"
+                },
+                "type": "message_router"
+              }
+            },
+            "key_path": "/opt/app/pmsh/etc/certs/key.pem",
+            "aaf_identity": "dcae@dcae.onap.org",
+            "aaf_password": "demo123456!"
+          }
+        }
+      }
+    }
+  }
+]
diff --git a/tests/dcaegen2-services-pmsh/testcases/assets/mr-expectation-aai-pnf-created.json b/tests/dcaegen2-services-pmsh/testcases/assets/mr-expectation-aai-pnf-created.json
new file mode 100644
index 0000000..9c9dc6e
--- /dev/null
+++ b/tests/dcaegen2-services-pmsh/testcases/assets/mr-expectation-aai-pnf-created.json
@@ -0,0 +1,36 @@
+[
+  {
+    "httpRequest": {
+      "path": "/events/AAI_EVENT/dcae_pmsh_cg/AAI-EVENT"
+    },
+    "httpResponse": {
+      "statusCode": 200,
+      "headers": {
+        "content-type": [
+          "application/json"
+        ]
+      },
+      "body": [
+        "{\"cambria.partition\":\"AAI\",\"event-header\":{\"severity\":\"NORMAL\",\"entity-type\":\"pnf\",\"top-entity-type\":\"pnf\",\"entity-link\":\"/aai/v16/network/pnfs/pnf/pnf_newly_discovered\",\"event-type\":\"AAI-EVENT\",\"domain\":\"dev\",\"action\":\"UPDATE\",\"sequence-number\":\"0\",\"id\":\"db09e090-196e-4f84-9645-e449b1cd3640\",\"source-name\":\"dcae-curl\",\"version\":\"v16\",\"timestamp\":\"20200203-15:14:08:807\"},\"entity\":{\"ipaddress-v4-oam\":\"10.10.10.37\",\"nf-role\":\"gNB\",\"equip-type\":\"val8\",\"relationship-list\":{\"relationship\":[{\"related-to\":\"service-instance\",\"relationship-data\":[{\"relationship-value\":\"Demonstration\",\"relationship-key\":\"customer.global-customer-id\"},{\"relationship-value\":\"vCPE\",\"relationship-key\":\"service-subscription.service-type\"},{\"relationship-value\":\"2c03b2a8-e31a-4749-9e99-3089ab441400\",\"relationship-key\":\"service-instance.service-instance-id\"}],\"related-link\":\"/aai/v16/business/customers/customer/Demonstration/service-subscriptions/service-subscription/vCPE/service-instances/service-instance/2c03b2a8-e31a-4749-9e99-3089ab441400\",\"relationship-label\":\"org.onap.relationships.inventory.ComposedOf\",\"related-to-property\":[{\"property-key\":\"service-instance.service-instance-name\",\"property-value\":\"Svc6_1\"}]}]},\"equip-vendor\":\"Ericsson\",\"serial-number\":\"6061ZW3\",\"ipaddress-v6-oam\":\"2001:0db8:0:0:0:0:1428:57ab\",\"equip-model\":\"val6\",\"in-maint\":false,\"resource-version\":\"1578668956804\",\"sw-version\":\"val7\",\"pnf-id\":\"eabcfaf7-b7f3-45fb-94e7-e6112fb3e8b8\",\"pnf-name\":\"pnf_newly_discovered\",\"orchestration-status\":\"Active\"}}"
+      ]
+    },
+    "times": {
+      "remainingTimes": 1,
+      "unlimited": false
+    }
+  },
+  {
+    "httpRequest": {
+      "path": "/events/AAI_EVENT/dcae_pmsh_cg/AAI-EVENT"
+    },
+    "httpResponse": {
+      "statusCode": 200,
+      "headers": {
+        "content-type": [
+          "application/json"
+        ]
+      },
+      "body": "{}"
+    }
+  }
+]
diff --git a/tests/dcaegen2-services-pmsh/testcases/assets/mr-expectation-aai-pnf-deleted.json b/tests/dcaegen2-services-pmsh/testcases/assets/mr-expectation-aai-pnf-deleted.json
new file mode 100644
index 0000000..c0accc8
--- /dev/null
+++ b/tests/dcaegen2-services-pmsh/testcases/assets/mr-expectation-aai-pnf-deleted.json
@@ -0,0 +1,36 @@
+[
+  {
+    "httpRequest": {
+      "path": "/events/AAI_EVENT/dcae_pmsh_cg/AAI-EVENT"
+    },
+    "httpResponse": {
+      "statusCode": 200,
+      "headers": {
+        "content-type": [
+          "application/json"
+        ]
+      },
+      "body": [
+        "{\"cambria.partition\":\"AAI\",\"event-header\":{\"severity\":\"NORMAL\",\"entity-type\":\"pnf\",\"top-entity-type\":\"pnf\",\"entity-link\":\"/aai/v16/network/pnfs/pnf/pnf_newly_discovered\",\"event-type\":\"AAI-EVENT\",\"domain\":\"dev\",\"action\":\"DELETE\",\"sequence-number\":\"0\",\"id\":\"db09e090-196e-4f84-9645-e449b1cd3640\",\"source-name\":\"dcae-curl\",\"version\":\"v16\",\"timestamp\":\"20200203-15:14:08:807\"},\"entity\":{\"ipaddress-v4-oam\":\"10.10.10.37\",\"nf-role\":\"gNB\",\"equip-type\":\"val8\",\"relationship-list\":{\"relationship\":[{\"related-to\":\"service-instance\",\"relationship-data\":[{\"relationship-value\":\"Demonstration\",\"relationship-key\":\"customer.global-customer-id\"},{\"relationship-value\":\"vCPE\",\"relationship-key\":\"service-subscription.service-type\"},{\"relationship-value\":\"2c03b2a8-e31a-4749-9e99-3089ab441400\",\"relationship-key\":\"service-instance.service-instance-id\"}],\"related-link\":\"/aai/v16/business/customers/customer/Demonstration/service-subscriptions/service-subscription/vCPE/service-instances/service-instance/2c03b2a8-e31a-4749-9e99-3089ab441400\",\"relationship-label\":\"org.onap.relationships.inventory.ComposedOf\",\"related-to-property\":[{\"property-key\":\"service-instance.service-instance-name\",\"property-value\":\"Svc6_1\"}]}]},\"equip-vendor\":\"Ericsson\",\"serial-number\":\"6061ZW3\",\"ipaddress-v6-oam\":\"2001:0db8:0:0:0:0:1428:57ab\",\"equip-model\":\"val6\",\"in-maint\":false,\"resource-version\":\"1578668956804\",\"sw-version\":\"val7\",\"pnf-id\":\"eabcfaf7-b7f3-45fb-94e7-e6112fb3e8b8\",\"pnf-name\":\"pnf_newly_discovered\",\"orchestration-status\":\"Active\"}}"
+      ]
+    },
+    "times": {
+      "remainingTimes": 1,
+      "unlimited": false
+    }
+  },
+  {
+    "httpRequest": {
+      "path": "/events/AAI_EVENT/dcae_pmsh_cg/AAI-EVENT"
+    },
+    "httpResponse": {
+      "statusCode": 200,
+      "headers": {
+        "content-type": [
+          "application/json"
+        ]
+      },
+      "body": "{}"
+    }
+  }
+]
diff --git a/tests/dcaegen2-services-pmsh/testcases/assets/mr-expectation-policy-subscription-created-pnf-existing.json b/tests/dcaegen2-services-pmsh/testcases/assets/mr-expectation-policy-subscription-created-pnf-existing.json
new file mode 100644
index 0000000..cc14f3c
--- /dev/null
+++ b/tests/dcaegen2-services-pmsh/testcases/assets/mr-expectation-policy-subscription-created-pnf-existing.json
@@ -0,0 +1,39 @@
+[
+  {
+    "httpRequest": {
+      "path": "/events/org.onap.dmaap.mr.PM_SUBSCRIPTIONS/dcae_pmsh_cg/policy_response_consumer"
+    },
+    "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-existing\", \"changeType\": \"CREATE\", \"message\": \"success\"}}"
+      ]
+    },
+    "times": {
+      "remainingTimes": 1,
+      "unlimited": false
+    }
+  },
+  {
+    "httpRequest": {
+      "path": "/events/org.onap.dmaap.mr.PM_SUBSCRIPTIONS/dcae_pmsh_cg/policy_response_consumer"
+    },
+    "httpResponse": {
+      "statusCode": 200,
+      "headers": {
+        "content-type": [
+          "application/json"
+        ]
+      },
+      "body": {
+        "type": "JSON",
+        "json": {}
+      }
+    }
+  }
+]
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
new file mode 100644
index 0000000..79bfb44
--- /dev/null
+++ b/tests/dcaegen2-services-pmsh/testcases/assets/mr-expectation-policy-subscription-created-pnf-new.json
@@ -0,0 +1,39 @@
+[
+  {
+    "httpRequest": {
+      "path": "/events/org.onap.dmaap.mr.PM_SUBSCRIPTIONS/dcae_pmsh_cg/policy_response_consumer"
+    },
+    "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/org.onap.dmaap.mr.PM_SUBSCRIPTIONS/dcae_pmsh_cg/policy_response_consumer"
+    },
+    "httpResponse": {
+      "statusCode": 200,
+      "headers": {
+        "content-type": [
+          "application/json"
+        ]
+      },
+      "body": {
+        "type": "JSON",
+        "json": {}
+      }
+    }
+  }
+]