summaryrefslogtreecommitdiffstats
path: root/src/test/resources
diff options
context:
space:
mode:
authorsblimkie <steven.blimkie@amdocs.com>2018-03-15 13:53:15 -0400
committersblimkie <steven.blimkie@amdocs.com>2018-03-15 13:53:15 -0400
commitd41ef90610aadb5aa3372d5922155e4fc4e0a407 (patch)
tree14e2a48d3d8aa4b1bce5c49c052fcd9e93e69227 /src/test/resources
parentb6ec637f5ee03c573855431e65fcb6ab0f321851 (diff)
Add junit tests
Add junit tests Change-Id: Iaa22b0faa206114ef39648d451a5275205d14d9a Issue-ID: AAI-885 Signed-off-by: sblimkie <steven.blimkie@amdocs.com>
Diffstat (limited to 'src/test/resources')
-rw-r--r--src/test/resources/model/edge_properties_v10.json14
-rw-r--r--src/test/resources/model/edge_properties_v11.json14
-rw-r--r--src/test/resources/model/edge_properties_v8.json14
-rw-r--r--src/test/resources/model/edge_properties_v9.json14
-rw-r--r--src/test/resources/payloads/bulk.json80
-rw-r--r--src/test/resources/payloads/graphVertexEvent.json23
6 files changed, 123 insertions, 36 deletions
diff --git a/src/test/resources/model/edge_properties_v10.json b/src/test/resources/model/edge_properties_v10.json
index 7cbddae..8d00636 100644
--- a/src/test/resources/model/edge_properties_v10.json
+++ b/src/test/resources/model/edge_properties_v10.json
@@ -1,10 +1,6 @@
{
- "isParent":"java.lang.Boolean",
- "isParent-REV":"java.lang.Boolean",
- "usesResource":"java.lang.Boolean",
- "usesResource-REV":"java.lang.Boolean",
- "SVC-INFRA":"java.lang.Boolean",
- "SVC-INFRA-REV":"java.lang.Boolean",
- "hasDelTarget":"java.lang.Boolean",
- "hasDelTarget-REV":"java.lang.Boolean"
-}
+ "contains-other-v": "java.lang.String",
+ "delete-other-v": "java.lang.String",
+ "SVC-INFRA": "java.lang.String",
+ "prevent-delete": "java.lang.String"
+} \ No newline at end of file
diff --git a/src/test/resources/model/edge_properties_v11.json b/src/test/resources/model/edge_properties_v11.json
index ce0e6d5..8d00636 100644
--- a/src/test/resources/model/edge_properties_v11.json
+++ b/src/test/resources/model/edge_properties_v11.json
@@ -1,10 +1,6 @@
{
- "isParent": "java.lang.Boolean",
- "isParent-REV": "java.lang.Boolean",
- "usesResource": "java.lang.Boolean",
- "usesResource-REV": "java.lang.Boolean",
- "SVC-INFRA": "java.lang.Boolean",
- "SVC-INFRA-REV": "java.lang.Boolean",
- "hasDelTarget": "java.lang.Boolean",
- "hasDelTarget-REV": "java.lang.Boolean"
- } \ No newline at end of file
+ "contains-other-v": "java.lang.String",
+ "delete-other-v": "java.lang.String",
+ "SVC-INFRA": "java.lang.String",
+ "prevent-delete": "java.lang.String"
+} \ No newline at end of file
diff --git a/src/test/resources/model/edge_properties_v8.json b/src/test/resources/model/edge_properties_v8.json
index 7cbddae..8d00636 100644
--- a/src/test/resources/model/edge_properties_v8.json
+++ b/src/test/resources/model/edge_properties_v8.json
@@ -1,10 +1,6 @@
{
- "isParent":"java.lang.Boolean",
- "isParent-REV":"java.lang.Boolean",
- "usesResource":"java.lang.Boolean",
- "usesResource-REV":"java.lang.Boolean",
- "SVC-INFRA":"java.lang.Boolean",
- "SVC-INFRA-REV":"java.lang.Boolean",
- "hasDelTarget":"java.lang.Boolean",
- "hasDelTarget-REV":"java.lang.Boolean"
-}
+ "contains-other-v": "java.lang.String",
+ "delete-other-v": "java.lang.String",
+ "SVC-INFRA": "java.lang.String",
+ "prevent-delete": "java.lang.String"
+} \ No newline at end of file
diff --git a/src/test/resources/model/edge_properties_v9.json b/src/test/resources/model/edge_properties_v9.json
index 2ffcabb..8d00636 100644
--- a/src/test/resources/model/edge_properties_v9.json
+++ b/src/test/resources/model/edge_properties_v9.json
@@ -1,10 +1,6 @@
{
- "isParent":"java.lang.Boolean",
- "isParent-REV":"java.lang.Boolean",
- "usesResource":"java.lang.Boolean",
- "usesResource-REV":"java.lang.Boolean",
- "SVC-INFRA":"java.lang.Boolean",
- "SVC-INFRA-REV":"java.lang.Boolean",
- "hasDelTarget":"java.lang.Boolean",
- "hasDelTarget-REV":"java.lang.Boolean"
-}
+ "contains-other-v": "java.lang.String",
+ "delete-other-v": "java.lang.String",
+ "SVC-INFRA": "java.lang.String",
+ "prevent-delete": "java.lang.String"
+} \ No newline at end of file
diff --git a/src/test/resources/payloads/bulk.json b/src/test/resources/payloads/bulk.json
new file mode 100644
index 0000000..3d514a3
--- /dev/null
+++ b/src/test/resources/payloads/bulk.json
@@ -0,0 +1,80 @@
+{
+ "objects":[
+ {
+ "operation":"add",
+ "v1":{
+ "type":"vserver",
+ "properties":{
+ "vserver-id":"VSER1",
+ "vserver-name":"test-vserver",
+ "vserver-name2":"alt-test-vserver",
+ "vserver-selflink":"http://1.2.3.4/moreInfo",
+ "in-maint":false,
+ "is-closed-loop-disabled":false
+ }
+ }
+ },
+ {
+ "operation":"modify",
+ "v2":{
+ "id":"50bdab41-ad1c-4d00-952c-a0aa5d827811",
+ "type":"pserver",
+ "properties":{
+ "ptnii-equip-name":"e-name",
+ "equip-type":"server",
+ "hostname":"steve-host2",
+ "equip-vendor":"HP",
+ "equip-model":"DL380p-nd",
+ "fqdn":"myhost.onap.net",
+ "purpose":"my-purpose",
+ "ipv4-oam-address":"1.2.3.4"
+ }
+ }
+ },
+ {
+ "operation":"delete",
+ "v3":{
+ "id":"50bdab41-ad1c-4d00-952c-a0aa5d827811",
+ "type":"pserver"
+ }
+ }
+ ],
+ "relationships":[
+ {
+ "operation":"add",
+ "e1":{
+ "type":"tosca.relationships.HostedOn",
+ "source":"services/inventory/v11/vserver/50bdab41-ad1c-4d00-952c-a0aa5d827811",
+ "target":"services/inventory/v11/pserver/1d326bc7-b985-492b-9604-0d5d1f06f908",
+ "properties":{
+ "contains-other-v":"NONE",
+ "delete-other-v":"NONE",
+ "SVC-INFRA":"OUT",
+ "prevent-delete":"IN"
+ }
+ }
+ },
+ {
+ "operation":"modify",
+ "e2":{
+ "id":"50bdab41-ad1c-4d00-952c-a0aa5d827811",
+ "type":"tosca.relationships.HostedOn",
+ "source":"services/inventory/v11/vserver/50bdab41-ad1c-4d00-952c-a0aa5d827811",
+ "target":"services/inventory/v11/pserver/1d326bc7-b985-492b-9604-0d5d1f06f908",
+ "properties":{
+ "contains-other-v":"NONE",
+ "delete-other-v":"NONE",
+ "SVC-INFRA":"OUT",
+ "prevent-delete":"IN"
+ }
+ }
+ },
+ {
+ "operation":"delete",
+ "e3":{
+ "id":"50bdab41-ad1c-4d00-952c-a0aa5d827811",
+ "type":"tosca.relationships.HostedOn"
+ }
+ }
+ ]
+}
diff --git a/src/test/resources/payloads/graphVertexEvent.json b/src/test/resources/payloads/graphVertexEvent.json
new file mode 100644
index 0000000..7e1fd62
--- /dev/null
+++ b/src/test/resources/payloads/graphVertexEvent.json
@@ -0,0 +1,23 @@
+ {
+ "timestamp": 1514927928167,
+ "operation": "UPDATE",
+ "vertex": {
+ "properties": {
+ "ipv4-oam-address": "1.2.3.4",
+ "resource-version": "1477013499",
+ "purpose": "my-purpose",
+ "fqdn": "myhost.onap.net",
+ "in-maint": false,
+ "equip-model": "DL380p-nd",
+ "equip-vendor": "HP",
+ "equip-type": "server",
+ "hostname": "myhost",
+ "ptnii-equip-name": "e-name"
+ },
+ "key": "mykey",
+ "type": "pserver",
+ "schema-version": "v11"
+ },
+ "transaction-id": "c0a81fa7-5ef4-49cd-ab39-e42c53c9b9a4",
+ "database-transaction-id": "b3e2853e-f643-47a3-a0c3-cb54cc997ad3"
+ }